Skip to content

Commit 596beb5

Browse files
committed
Added include_client_id into Auth0 example i/o changing default behavior
1 parent 9bfe173 commit 596beb5

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

docs/examples/native_spa_pkce_auth0.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616

1717
redirect_response = input('Paste the full redirect URL here: ')
1818

19-
token = session.fetch_token(token_url, authorization_response=redirect_response)
19+
token = session.fetch_token(token_url, authorization_response=redirect_response, include_client_id=True)
2020
print(token)

requests_oauthlib/oauth2_session.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,6 @@ def fetch_token(
330330

331331
# otherwise we may need to create an auth header
332332
else:
333-
# In case client_secret is none, it means we are in public clients
334-
# so OAuth2 AS should read client_id into params instead of Basic Auth.
335-
if client_secret is None:
336-
include_client_id = True
337-
338333
# since we don't have an auth header, we MAY need to create one
339334
# it is possible that we want to send the `client_id` in the body
340335
# if so, `include_client_id` should be set to True

0 commit comments

Comments
 (0)