]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Fix Google OAuth example (from 6.0 OAuth2Mixin->authorize_redirect is an ordinary... 2811/head
authorbn0ir <gblacknoir@gmail.com>
Fri, 14 Feb 2020 12:37:52 +0000 (17:37 +0500)
committerbn0ir <gblacknoir@gmail.com>
Fri, 14 Feb 2020 12:43:45 +0000 (17:43 +0500)
tornado/auth.py

index ed9018572f5ccfae0b272d42b777d9dd26ae9d12..69927cc3290edb536910d303206ff10891b4315e 100644 (file)
@@ -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'],