requests-oauthlib icon indicating copy to clipboard operation
requests-oauthlib copied to clipboard

WIP: Add PKCE support with oauthlib 3.2.0

Open JonathanHuot opened this issue 3 years ago • 0 comments

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 avatar Jun 29 '22 20:06 JonathanHuot