-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Basic implementation of PKCE #1652
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
Conversation
|
Hi @Teeed , I tried your PR and it was mostly functional. It seems there is no way to get to the handleAuthCode without actually passing the basic auth (providing a valid client secret). Shouldn't the handling of the secret be deferred only in the case that PKCE flow is not used (ie. when there is no code_verifier?). Making this change allows for PKCE to commence without a secret. |
|
Has there been any progress on implementing PKCE? I've been working on a branch which implements the OAuth 2 Device Authorization Grant, and I know that to make a fully featured native app flow, PKCE should be included as well. Would be beneficial not to duplicate work |
| } | ||
|
|
||
| if codeChallengeFromStorage != calculatedCodeChallenge { | ||
| s.tokenErrHelper(w, errInvalidRequest, "invalid code_verifier.", http.StatusBadRequest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to RFC 7636, errInvalidGrant should be returned.
code_verifier == code_challenge.
If the values are equal, the token endpoint MUST continue processing
as normal (as defined by OAuth 2.0 [RFC6749]). If the values are not equal, an error response indicating "invalid_grant" as described in Section 5.2 of [RFC6749] MUST be returned.
|
Yeah. First of all: sorry for not responding for such a long time. Thanks for raising issues! 👍 Company which I work for (and which allowed me to push these changes to upstream) decided that this changes are no longer needed and hence development of these changes was stalled. I currently work on different projects, so I do not have time (and business reason 😕) to fix raised issues. If anyone wants to continue this work - please do! |
|
Hi @Teeed, thanks for your efforts here. Does this add:
We would be interested in case 1. |
|
Hi @Teeed ,
Our company wants to finish your work. Signing off the commit should work like this: Thanks |
Signed-off-by: Tadeusz Magura-Witkowski <[email protected]>
|
Closing, as these changes got merged with #1784 |
This is my own implementation of PKCE, it is similar to #1407 but this version could be directly merged.
Issue #1114