From: bn0ir Date: Fri, 14 Feb 2020 12:37:52 +0000 (+0500) Subject: Fix Google OAuth example (from 6.0 OAuth2Mixin->authorize_redirect is an ordinary... X-Git-Tag: v6.1.0b1~21^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dedc4d52c87a0cea48188047a07fb3d96af6c64b;p=thirdparty%2Ftornado.git Fix Google OAuth example (from 6.0 OAuth2Mixin->authorize_redirect is an ordinary synchronous function) --- 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'],