Accept either old or new login requests during transition. (#1785)
* Accept either old or new login requests during transition. * Made suggested edit * Update api/login_api.py Co-authored-by: Kyle Ju <kyleju@google.com>
This commit is contained in:
Родитель
9118ccc72c
Коммит
b8582da8b0
|
@ -28,8 +28,10 @@ class LoginAPI(basehandlers.APIHandler):
|
|||
"""Create a session using the credential generated by Google Sign-In."""
|
||||
|
||||
def do_post(self):
|
||||
token = self.get_param('credential')
|
||||
message = "Unable to Authenticate"
|
||||
# TODO(jrobbins): Remove id_token after next deployment.
|
||||
token = (self.get_param('id_token', required=False) or
|
||||
self.get_param('credential'))
|
||||
message = "Unable to Authenticate. Please sign in again."
|
||||
|
||||
try:
|
||||
idinfo = id_token.verify_oauth2_token(
|
||||
|
|
Загрузка…
Ссылка в новой задаче