-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Token parsing error with Logto OIDC integration #8
Comments
Hey, |
Good news 🎉 I believe I found the issue and I'm running one final verification test to confirm. Will update with the complete details once confirmed, including steps to reproduce and fix. In the meantime, can you clarify whether you prefer issues and PRs to be submitted to Timshel/OIDCWarden or Timshel/vaultwarden repository? |
Both project are updated at the moment, so you can submit to whichever you are using. I'll propagate the fix to the other one :). |
…Claims. Related to issue: Token parsing error with Logto OIDC integration Timshel#8
Hey I can see you started to modify the The claims used during the SSO flow are handled by https://github.com/ramosbugs/openidconnect-rs which is quite strict in it's handling (which is probably the source of the error). |
Yes, you're right. When testing with Logto, the SSO login works when the user has a profile picture URL set but fails when the picture field is null. Upon closer inspection, I've realised that this error occurs during the token exchange with the OIDC provider, which is handled by the openidconnect-rs crate, rather than during our internal JWT handling. Given that openidconnect-rs is quite strict in its parsing, do you have any suggestions on how we can accommodate null values for optional fields like |
I believe the source of strictness from the lib is that the open-id spec mention that null value should not be included: cf ramosbugs/openidconnect-rs#184 (comment) But he does mention that he intends to make it more lax, and I believe he has made it so, but it will probably be only included in the next major 4.0.0 release. |
Description
When attempting to use OIDCWarden with Logto as the OIDC provider, the token endpoint fails to parse the response with the following error:
Failed to contact token endpoint: Parse(Error { path: Path { segments: [] }, original: Error("Failed to parse payload JSON: Error("invalid type: null, expected a string", line: 1, column: 371)", line: 1, column: 878) }
The token response appears to be valid JSON containing access_token, expires_in, and id_token fields, but the parser is expecting a string where it's finding a null value.
Environment
Configuration
Steps to reproduce
Related information
This appears to be similar to the Auth0 timestamp parsing issue mentioned in the documentation that requires the accept-rfc3339-timestamps feature flag.
The text was updated successfully, but these errors were encountered: