Skip to content

Add PKCE (RFC 7636) to mithrandir OAuth flow#1053

Open
luke-hagar-sp wants to merge 3 commits intomainfrom
pkce-implementation
Open

Add PKCE (RFC 7636) to mithrandir OAuth flow#1053
luke-hagar-sp wants to merge 3 commits intomainfrom
pkce-implementation

Conversation

@luke-hagar-sp
Copy link
Contributor

Protect the authorization code grant against interception attacks by generating a code_verifier/code_challenge pair (S256) during auth initiation and sending the verifier during token exchange. The verifier is stored in DynamoDB and never exposed in API responses.

Protect the authorization code grant against interception attacks by
generating a code_verifier/code_challenge pair (S256) during auth
initiation and sending the verifier during token exchange. The verifier
is stored in DynamoDB and never exposed in API responses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

🌎🌎🌎 Visit the preview URL for this PR HERE
built from commit 0ed38b9

Copy link

@forrest-short-sp forrest-short-sp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

tokenExchangeURL.searchParams.set('client_id', validatedClientId);
tokenExchangeURL.searchParams.set('code', code);
tokenExchangeURL.searchParams.set('redirect_uri', redirectUri);
tokenExchangeURL.searchParams.set('code_verifier', codeVerifier);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these form-data params or query params?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is building a URL, so query params. I DM'd you about the flows that need updating

@sailpoint-oss sailpoint-oss deleted a comment from LukasParke Mar 16, 2026
Updated the token exchange functions to utilize URLSearchParams for constructing the request body, improving readability and maintainability. Removed the redirectUri parameter from the exchangeCodeForToken function as it is no longer needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants