mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-25 00:22:43 -05:00
fix(generic-oauth): remove code verifier on verification request if pkce isn't enabled
This commit is contained in:
@@ -492,7 +492,7 @@ export const genericOAuth = (options: GenericOAuthOptions) => {
|
|||||||
}
|
}
|
||||||
tokens = await validateAuthorizationCode({
|
tokens = await validateAuthorizationCode({
|
||||||
code,
|
code,
|
||||||
codeVerifier,
|
codeVerifier: provider.pkce ? codeVerifier : undefined,
|
||||||
redirectURI: `${ctx.context.baseURL}/oauth2/callback/${provider.providerId}`,
|
redirectURI: `${ctx.context.baseURL}/oauth2/callback/${provider.providerId}`,
|
||||||
options: {
|
options: {
|
||||||
clientId: provider.clientId,
|
clientId: provider.clientId,
|
||||||
|
|||||||
Reference in New Issue
Block a user