Skip to content

Commit 13a28a9

Browse files
committed
use prompt instead of approval_prompt in docs
1 parent f98e7bd commit 13a28a9

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

docs/examples/google.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ a callback URL then you can try out the command line interactive example below.
2929
>>> authorization_url, state = google.authorization_url(authorization_base_url,
3030
... # offline for refresh token
3131
... # force to always make user click authorize
32-
... access_type="offline", approval_prompt="force")
32+
... access_type="offline", prompt="select_account")
3333
>>> print 'Please go here and authorize,', authorization_url
3434
3535
>>> # Get the authorization verifier code from the callback url

docs/examples/real_world_example_with_refresh.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ trivial to transfer to any other web framework and provider.
5858
authorization_url, state = google.authorization_url(authorization_base_url,
5959
# offline for refresh token
6060
# force to always make user click authorize
61-
access_type="offline", approval_prompt="force")
61+
access_type="offline", prompt="select_account")
6262
6363
# State is used to prevent CSRF, keep this for later.
6464
session['oauth_state'] = state

docs/oauth2_workflow.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ the provider is Google and the protected resource is the user's profile.
6868
scope=scope)
6969
>>> authorization_url, state = oauth.authorization_url(
7070
'https://accounts.google.com/o/oauth2/auth',
71-
# access_type and approval_prompt are Google specific extra
71+
# access_type and prompt are Google specific extra
7272
# parameters.
73-
access_type="offline", approval_prompt="force")
73+
access_type="offline", prompt="select_account")
7474
7575
>>> print 'Please go to %s and authorize access.' % authorization_url
7676
>>> authorization_response = raw_input('Enter the full callback URL')
@@ -163,17 +163,17 @@ Backend Application Flow
163163
The steps below outline how to use the Resource Owner Client Credentials Grant Type flow to obtain an access token.
164164

165165
0. Obtain credentials from your OAuth provider. At minimum you will
166-
need a ``client_id`` and ``client_secret``.
166+
need a ``client_id`` and ``client_secret``.
167167

168168
.. code-block:: pycon
169-
169+
170170
>>> client_id = 'your_client_id'
171171
>>> client_secret = 'your_client_secret'
172172
173173
1. Fetch an access token from the provider.
174174

175175
.. code-block:: pycon
176-
176+
177177
>>> from oauthlib.oauth2 import BackendApplicationClient
178178
>>> client = BackendApplicationClient(client_id=client_id)
179179
>>> oauth = OAuth2Session(client=client)
@@ -183,14 +183,14 @@ The steps below outline how to use the Resource Owner Client Credentials Grant T
183183
If your provider requires that you pass auth credentials in a Basic Auth header, you can do this instead:
184184

185185
.. code-block:: pycon
186-
186+
187187
>>> from oauthlib.oauth2 import BackendApplicationClient
188188
>>> from requests.auth import HTTPBasicAuth
189189
>>> auth = HTTPBasicAuth(client_id, client_secret)
190190
>>> client = BackendApplicationClient(client_id=client_id)
191191
>>> oauth = OAuth2Session(client=client)
192192
>>> token = oauth.fetch_token(token_url='https://provider.com/oauth2/token', auth=auth)
193-
193+
194194
Refreshing tokens
195195
-----------------
196196

0 commit comments

Comments
 (0)