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

Proof Key for Code Exchange (PKCE) #171

Closed
2 tasks done
ilijaNL opened this issue Aug 5, 2022 · 3 comments · Fixed by #240
Closed
2 tasks done

Proof Key for Code Exchange (PKCE) #171

ilijaNL opened this issue Aug 5, 2022 · 3 comments · Fixed by #240

Comments

@ilijaNL
Copy link

ilijaNL commented Aug 5, 2022

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

Hello, i wonder how this libary is dealing with Proof Key for Code Exchange (https://oauth.net/2/pkce/).
As I understand correctly and checking out the code there is a generateStateFunction and checkStateFunction which is used to compare the state object (once generated on startup). To apply PKCE, do I need to implement my own generateStateFunction & checkStateFunction or is pkce already covered?

@mcollina
Copy link
Member

mcollina commented Aug 5, 2022

Thanks for asking. The simple answer is that you likely know more about oauth2 than the maintainers of this library.
We use https://www.npmjs.com/package/simple-oauth2 internally.

@ilijaNL
Copy link
Author

ilijaNL commented Aug 5, 2022

I noticed, I will raise a issue there. Thanks

Edit: lelylan/simple-oauth2#399

@big-kahuna-burger
Copy link
Contributor

big-kahuna-burger commented Nov 21, 2023

@ilijaNL PKCE and having state in Authorization Code Grant are two different things.

state parameter is already described and suggested to be used in OAuth 2.0 RFC 6749
for Implicit and Authorization Code Grant.

PKCE is a separate extension described in RFC 7636 that applies only for Authorization Code Grant for public clients, which prevents some attacks based on interception of authorization codes, when properly implemented by Auth Server and Client.

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