Closed NilsBaumgartner1994 closed 1 week ago
There is no definition that would explicitly allow redirects, the specs say the response is to be a 200, that's what the client expects. That's just to explain the behaviour.
That being said, you can opt-in to redirects for particular URLs.
import * as client from 'openid-client'
const issuer = new URL('https://oidc-proxy.aai.dfn.de')
await client.discovery(issuer, '<clientId>', undefined, undefined, {
[client.customFetch]: (url, options) => {
if (url === `${issuer.href}.well-known/openid-configuration`) {
options.redirect = 'follow'
}
return globalThis.fetch(url, options)
}
})
What happened?
When configuring an open id provider: https://XXXXXXX/.well-known/openid-configuration they redirect and therefore i get an error.
This is due to a problem openid-client?
This happens in ^5.0.0 and ^6.0.0
Version
v6.0.0
Runtime
Node.js
Runtime Details
v18.19.1
Code to reproduce
Required