fix(oidc): temporarily disable pkce
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Erki Aas 2024-03-26 14:47:45 +02:00
parent 4d17c3bcff
commit ed9559efe5
2 changed files with 0 additions and 8 deletions

View File

@ -33,18 +33,12 @@ export class AuthOidcService<ServiceParams extends AuthOidcParams = AuthOidcPara
id_token_signed_response_alg: config.get('oidc.signedResponseAlg'),
token_endpoint_auth_method: config.get('oidc.authMethod'),
});
const codeVerifier = generators.codeVerifier();
const codeChallenge = generators.codeChallenge(codeVerifier);
const url = client.authorizationUrl({
redirect_uri: config.get('clientUrl') + '/auth-oidc/callback',
scope: config.get('oidc.scopes'),
response_type: config.get('oidc.responseTypes'),
code_challenge: codeChallenge,
code_challenge_method: config.get('oidc.codeChallengeMethod'),
});
params.session.codeVerifier = codeVerifier;
return url;
}
}

View File

@ -37,11 +37,9 @@ export class AuthOidcCallbackService<ServiceParams extends AuthOidcCallbackParam
response_types: ['code'],
});
const codeVerifier = params.session.codeVerifier;
const tokenSet = await client.callback(
config.get('clientUrl') + '/auth-oidc/callback',
{ code: params.query.code, iss: params.query.iss },
{ code_verifier: codeVerifier }
);
const userinfo = await client.userinfo(tokenSet.access_token as string);