-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
verify_hash/3 expects JWK to have "alg" field #6
Comments
If you're using ID tokens that don't have this parameter, then you have a problem with respect to the standard:
That said this function should not take into parameter a JWT, but a JOSE header or an ID token (it's not clear which alg to use when the ID token is encrypted - more research his needed). Will take a look at it when possible. Worth noting that Last note: the Thanks for the bug report. |
Yes, I can extract "alg" from my ID token. And docs clearly say, that "alg" from ID token header should be used for token/code validation. here Thanks for help! |
You could also used https://hexdocs.pm/jose_utils/JOSEUtils.JWS.html#peek_header/1 from the I'm leaving this issue opened as rework is needed. |
One side note: if you're doing some OIDC, have you considered using the https://github.com/tanguilp/plugoid library? |
We didn't notice this library during investigation phase. It seems like amount of customisation required would be too much.
I'll do some research to understand what exactly |
|
I tried to use
verify_hash/3
, but can't because my public JWK doesn't have"alg"
field.According to JWK specification,
"alg"
is optional, so it seems like OIDC library shouldn't depend on it.I unsuccessfully tried to find a way to generate key with "alg".
JOSE.JWK is used for generation:
The text was updated successfully, but these errors were encountered: