-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: explicit config of id token alg (#1567) #1568
base: main
Are you sure you want to change the base?
feat: explicit config of id token alg (#1567) #1568
Conversation
- support to configure `id_token_signed_response_alg` field in the configuration object passed to `issuer.Client` in `src/lib/server/auth.ts`. - allow `id_token_signed_response_alg` to be set from environment variable `OIDConfig.ID_TOKEN_SIGNED_RESPONSE_ALG` or obtained via OP metadata during issuer discovery when `RS256` is not included.
Hi, out of curiosity why is this needed? Not opposed to adding it, but I'm interested in what the use case is. |
Hi nsarrazin, I have a project using OIDC auth with an on-prem hosted Authentik (https://goauthentik.io/) as the IdP. In our case, the provider in Authentik only supports HS256 for I only discovered this situation after debugging chat-ui and finding an I could not find another way around this issue, and implementing this optional parameter solved my case. If I missed something and this situation is solved another way, that would be great as well. I don't know how widespread this case is, but I did not find very much related to it, so I thought it might be worth sharing.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi 👋 sorry for the delay on this, I updated the code a bit to ensure it passes all checks. Let me know if it still works for you!
I also made sure to add ID_TOKEN_SIGNED_RESPONSE_ALG
in the zod object. For now it's an optional string. Do you think we could narrow it down to some literals option ? Not super familiar with the spec so let me know if you think it's possible.
support to configure
id_token_signed_response_alg
field in the configuration object passed toissuer.Client
insrc/lib/server/auth.ts
.allow
id_token_signed_response_alg
to be set from environment variableOIDConfig.ID_TOKEN_SIGNED_RESPONSE_ALG
or obtained via OP metadata during issuer discovery whenRS256
is not included.