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

No option for PKCE plain challenge option #735

Open
EPoikans opened this issue Aug 10, 2024 · 0 comments
Open

No option for PKCE plain challenge option #735

EPoikans opened this issue Aug 10, 2024 · 0 comments

Comments

@EPoikans
Copy link

According to RFC 7636 the PKCE code challenge can have S256 or plain options even though you should'nt use plain.
I was working on implementing PKCE and couldn't find a PlainChallengeOption function and had to just add the correct values to the auth code options.
I propose adding this simple function and will submit a PR of it if there is no opposition to this enhancement.

The current code for S256 in pkce.go file

// S256ChallengeOption derives a PKCE code challenge derived from verifier with
// method S256. It should be passed to Config.AuthCodeURL or Config.DeviceAccess
// only.
func S256ChallengeOption(verifier string) AuthCodeOption {
	return challengeOption{
		challenge_method: "S256",
		challenge:        S256ChallengeFromVerifier(verifier),
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant