Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PKCE support with oauthlib 3.2.0 #497

Merged
merged 21 commits into from
Feb 27, 2024
Merged

Add PKCE support with oauthlib 3.2.0 #497

merged 21 commits into from
Feb 27, 2024

Conversation

JonathanHuot
Copy link
Contributor

Since oauthlib 3.2.0 now supports PKCE for Clients (https://github.com/oauthlib/oauthlib/releases/tag/v3.2.0), this PR proposes a first implementation .
Any feedbacks are welcome, I'm not sure it is production ready yet.

Change from:
session = OAuth2Session(client_id)
to
session = OAuth2Session(app.client_id, pkce="S256")

And be sure to reuse the same session for fetch_token, as it will need to remember code_verifier. It is not really practical beyond PoC, so any suggestions are welcome.

@JonathanHuot JonathanHuot changed the title WIP: Add PKCE support with oauthlib 3.2.0 Add PKCE support with oauthlib 3.2.0 Jan 10, 2023
@coveralls
Copy link

Coverage Status

coverage: 90.406% (-0.2%) from 90.584%
when pulling 596beb5 on pkce
into 424adf0 on master.

@JonathanHuot JonathanHuot merged commit 39fe529 into master Feb 27, 2024
7 checks passed
@JonathanHuot JonathanHuot added this to the 1.4.0 milestone Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants