fix(oidc): add PKCE support for keycloak login flow
This commit is contained in:
@@ -6,9 +6,15 @@ export const getOidcAuthorizeUrl = (redirectUri, options = {}) =>
|
||||
redirect_uri: redirectUri,
|
||||
login_hint: options.loginHint || undefined,
|
||||
prompt: options.prompt || undefined,
|
||||
idp_hint: options.idpHint || undefined
|
||||
idp_hint: options.idpHint || undefined,
|
||||
code_challenge: options.codeChallenge || undefined,
|
||||
code_challenge_method: options.codeChallengeMethod || undefined
|
||||
}
|
||||
})
|
||||
|
||||
export const exchangeOidcCode = (code, redirectUri) =>
|
||||
userHttp.post('/auth/oidc/exchange', { code, redirect_uri: redirectUri })
|
||||
export const exchangeOidcCode = (code, redirectUri, codeVerifier) =>
|
||||
userHttp.post('/auth/oidc/exchange', {
|
||||
code,
|
||||
redirect_uri: redirectUri,
|
||||
code_verifier: codeVerifier || undefined
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user