File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -114,10 +114,21 @@ async function setupOpenId() {
114
114
logger . info ( `[openidStrategy] proxy agent added: ${ process . env . PROXY } ` ) ;
115
115
}
116
116
const issuer = await Issuer . discover ( process . env . OPENID_ISSUER ) ;
117
+ /* Supported Algorithms, openid-client v5 doesn't set it automatically as discovered from server.
118
+ - id_token_signed_response_alg // defaults to 'RS256'
119
+ - request_object_signing_alg // defaults to 'RS256'
120
+ - userinfo_signed_response_alg // not in v5
121
+ - introspection_signed_response_alg // not in v5
122
+ - authorization_signed_response_alg // not in v5
123
+ */
124
+ const supported_alg = {
125
+ id_token_signed_response_alg : issuer . id_token_signing_alg_values_supported ?. [ 0 ] || 'RS256' ,
126
+ } ;
117
127
const client = new issuer . Client ( {
118
128
client_id : process . env . OPENID_CLIENT_ID ,
119
129
client_secret : process . env . OPENID_CLIENT_SECRET ,
120
130
redirect_uris : [ process . env . DOMAIN_SERVER + process . env . OPENID_CALLBACK_URL ] ,
131
+ ...supported_alg ,
121
132
} ) ;
122
133
const requiredRole = process . env . OPENID_REQUIRED_ROLE ;
123
134
const requiredRoleParameterPath = process . env . OPENID_REQUIRED_ROLE_PARAMETER_PATH ;
You canβt perform that action at this time.
0 commit comments