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

feat(pkce): add code challenge and verifier #2

Merged
merged 4 commits into from
Jun 8, 2024

Conversation

alvinsj
Copy link
Owner

@alvinsj alvinsj commented Jun 8, 2024

Story: PKCE code challenge

Prereq

  1. Why this change is required?
    a. PKCE code verifier and challenge for authorization
  2. What problem does it solve?
    b. Able to generate code verifier+challenge according to RFC 7636

Implementation

  1. Implement createPKCECodeChallenge according to RFC 7636
  2. Implement generateRandomString according to RFC 7636
  3. Use btoa for base64url encoding according to RFC 7636
  4. Use @aws-crypto/sha256-js for sha256 implementation

Checklist

  • Fulfilled specs
  • Ensured code is readable
  • Consistency in architecture
  • Added Test

@alvinsj alvinsj merged commit 0a768d1 into main Jun 8, 2024
1 check passed
@alvinsj alvinsj deleted the feat--code-challenge-and-verifier branch June 8, 2024 09:15
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

Successfully merging this pull request may close these issues.

1 participant