From dedc4d52c87a0cea48188047a07fb3d96af6c64b Mon Sep 17 00:00:00 2001 From: bn0ir Date: Fri, 14 Feb 2020 17:37:52 +0500 Subject: [PATCH] Fix Google OAuth example (from 6.0 OAuth2Mixin->authorize_redirect is an ordinary synchronous function) --- tornado/auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tornado/auth.py b/tornado/auth.py index ed9018572..69927cc32 100644 --- a/tornado/auth.py +++ b/tornado/auth.py @@ -44,7 +44,7 @@ Example usage for Google OAuth: code=self.get_argument('code')) # Save the user with e.g. set_secure_cookie else: - await self.authorize_redirect( + self.authorize_redirect( redirect_uri='http://your.site.com/auth/google', client_id=self.settings['google_oauth']['key'], scope=['profile', 'email'], @@ -886,7 +886,7 @@ class GoogleOAuth2Mixin(OAuth2Mixin): # Save the user and access token with # e.g. set_secure_cookie. else: - await self.authorize_redirect( + self.authorize_redirect( redirect_uri='http://your.site.com/auth/google', client_id=self.settings['google_oauth']['key'], scope=['profile', 'email'], -- 2.47.2