Improve clarity of OAuth 2.0 User Context example code
authorHarmon <Harmon758@gmail.com>
Wed, 5 Jul 2023 21:27:15 +0000 (16:27 -0500)
committerHarmon <Harmon758@gmail.com>
Wed, 5 Jul 2023 21:27:15 +0000 (16:27 -0500)
docs/authentication.rst

index 4e1fa2c1e49763f0b7d91a5e0e62c3c93dc6ccca..0c556f3f56b489c5c3112cd371ad93c000a03c91 100644 (file)
@@ -149,9 +149,10 @@ This can be used to have a user authenticate your app. Once they've done so,
 they'll be redirected to the Callback / Redirect URI / URL you provided. You'll
 need to pass that authorization response URL to fetch the access token::
 
-    access_token = oauth2_user_handler.fetch_token(
+    response = oauth2_user_handler.fetch_token(
         "Authorization Response URL here"
     )
+    access_token = response["access_token"]
 
 You can then pass the access token to :class:`Client` when initializing it::