fix(oidc): temporarily disable pkce
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
4d17c3bcff
commit
ed9559efe5
@ -33,18 +33,12 @@ export class AuthOidcService<ServiceParams extends AuthOidcParams = AuthOidcPara
|
|||||||
id_token_signed_response_alg: config.get('oidc.signedResponseAlg'),
|
id_token_signed_response_alg: config.get('oidc.signedResponseAlg'),
|
||||||
token_endpoint_auth_method: config.get('oidc.authMethod'),
|
token_endpoint_auth_method: config.get('oidc.authMethod'),
|
||||||
});
|
});
|
||||||
const codeVerifier = generators.codeVerifier();
|
|
||||||
const codeChallenge = generators.codeChallenge(codeVerifier);
|
|
||||||
|
|
||||||
const url = client.authorizationUrl({
|
const url = client.authorizationUrl({
|
||||||
redirect_uri: config.get('clientUrl') + '/auth-oidc/callback',
|
redirect_uri: config.get('clientUrl') + '/auth-oidc/callback',
|
||||||
scope: config.get('oidc.scopes'),
|
scope: config.get('oidc.scopes'),
|
||||||
response_type: config.get('oidc.responseTypes'),
|
response_type: config.get('oidc.responseTypes'),
|
||||||
code_challenge: codeChallenge,
|
|
||||||
code_challenge_method: config.get('oidc.codeChallengeMethod'),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
params.session.codeVerifier = codeVerifier;
|
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,11 +37,9 @@ export class AuthOidcCallbackService<ServiceParams extends AuthOidcCallbackParam
|
|||||||
response_types: ['code'],
|
response_types: ['code'],
|
||||||
});
|
});
|
||||||
|
|
||||||
const codeVerifier = params.session.codeVerifier;
|
|
||||||
const tokenSet = await client.callback(
|
const tokenSet = await client.callback(
|
||||||
config.get('clientUrl') + '/auth-oidc/callback',
|
config.get('clientUrl') + '/auth-oidc/callback',
|
||||||
{ code: params.query.code, iss: params.query.iss },
|
{ code: params.query.code, iss: params.query.iss },
|
||||||
{ code_verifier: codeVerifier }
|
|
||||||
);
|
);
|
||||||
const userinfo = await client.userinfo(tokenSet.access_token as string);
|
const userinfo = await client.userinfo(tokenSet.access_token as string);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user