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

Support PKCE in the authorization code flow #79

Open
francbartoli opened this issue Jan 16, 2025 · 4 comments
Open

Support PKCE in the authorization code flow #79

francbartoli opened this issue Jan 16, 2025 · 4 comments
Assignees
Labels

Comments

@francbartoli
Copy link

Is your feature request related to a problem? Please describe.
The current authorization flow for OIDC doesn't support PKCE

Describe the solution you'd like
I'd like to have the capability to configure PKCE in the OIDC configuration class

Describe alternatives you've considered
Use other packages or the native authlib

Additional context
NA

@busykoala
Copy link
Owner

Hi @francbartoli

I'll look into it, but will likely not have the time this month anymore. If you have a suggestion, feel free to open a PR to get it in earlier.

Thanks for opening the issue,
@busykoala

@francbartoli
Copy link
Author

thanks @busykoala, I have a WIP prototype on this branch https://github.com/francbartoli/fastapi-opa/tree/feature/support-pkce.
Happy if you could have a look and comment before an actual PR.

@busykoala
Copy link
Owner

Hi @francbartoli

The implementation looks great. I have a few little things that I saw, that I'm not fully happy with but might not be a great deal.

I hope the remarks make sense to you, and thank you very much for taking part in this project!

@francbartoli
Copy link
Author

@busykoala thanks for having a prompt look! For sure it needs some more love and your points make absolutely sense. So in order:

  • Tests to be added
  • quality checks
  • investigate the value for characters number to generate random strings in authlib.common.security.generate_token and better handle it from settings eventually
  • Put an example for PKCE scenarios?

I'll come up with the above improvements as soon as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants