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

Provide a helper method to derive a code challenge from a code verifier #44

Open
josephdecock opened this issue Nov 13, 2024 · 0 comments
Labels
area/identity-model Issues related to Identity Model impact/non-breaking The fix or change will not be a breaking one priority/4 Low

Comments

@josephdecock
Copy link
Member

Migrated from IdentityModel/IdentityModel#574

Some OAuth 2.0 servers and the OAuth 2.1 draft specification require PKCE, but IdentityModel lacks a method to derive an S256 code challenge from a code verifier, so I have to manually write

var codeChallenge = Base64Url.Encode(SHA256.HashData(Encoding.UTF8.GetBytes(codeVerifier)));

which is not very convenient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/identity-model Issues related to Identity Model impact/non-breaking The fix or change will not be a breaking one priority/4 Low
Projects
None yet
Development

No branches or pull requests

1 participant