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

getExternalAuthRedirectUri doesn't add PKCE parameters to URL #2810

Closed
rahul1 opened this issue Sep 11, 2023 · 0 comments · Fixed by #2812
Closed

getExternalAuthRedirectUri doesn't add PKCE parameters to URL #2810

rahul1 opened this issue Sep 11, 2023 · 0 comments · Fixed by #2812
Assignees
Labels
auth Authentication and authorization features and fixes bug Something isn't working

Comments

@rahul1
Copy link
Member

rahul1 commented Sep 11, 2023

Description

When signing in to an external auth provider with PKCE, some identity providers require that the PKCE parameters code_challenge_method and code_challenge are set as URL parameters

However, our getExternalAuthRedirectUriI() doesn't currently set those two params

getExternalAuthRedirectUri(
authorizeUrl: string,
clientId: string,
redirectUri: string,
loginRequest: BaseLoginRequest
): string {
const url = new URL(authorizeUrl);
url.searchParams.set('response_type', 'code');
url.searchParams.set('client_id', clientId);
url.searchParams.set('redirect_uri', redirectUri);
url.searchParams.set('scope', 'openid profile email');
url.searchParams.set('state', JSON.stringify(loginRequest));
return url.toString();
}

@rahul1 rahul1 added bug Something isn't working auth Authentication and authorization features and fixes labels Sep 11, 2023
@ThatOneBro ThatOneBro self-assigned this Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Authentication and authorization features and fixes bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants