diff --git a/lib/shared/token_auth.js b/lib/shared/token_auth.js index 5f8b620ea..3edc7b1eb 100644 --- a/lib/shared/token_auth.js +++ b/lib/shared/token_auth.js @@ -147,7 +147,7 @@ module.exports = function tokenAuth(provider, endpoint) { case 'client_secret_jwt': await tokenJwtAuth( ctx, ctx.oidc.client.keystore, - signingAlg ? [signingAlg] : ['HS256', 'HS384', 'HS512'], + signingAlg ? [signingAlg] : instance(provider).configuration(`${endpoint}EndpointAuthSigningAlgValues`).filter(alg => alg.startsWith('HS')), ); break; @@ -155,8 +155,7 @@ module.exports = function tokenAuth(provider, endpoint) { case 'private_key_jwt': await tokenJwtAuth( ctx, ctx.oidc.client.keystore, - signingAlg - ? [signingAlg] : ['ES256', 'ES384', 'ES512', 'RS256', 'RS384', 'RS512', 'PS256', 'PS384', 'PS512'], + signingAlg ? [signingAlg] : instance(provider).configuration(`${endpoint}EndpointAuthSigningAlgValues`).filter(alg => !alg.startsWith('HS')), ); break;