Skip to content
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

feature request: Support parsing 'expires_in' in token response as both number and string #5497

Open
magohl opened this issue Mar 12, 2024 · 3 comments
Assignees
Labels
feature-request Something cool or not cool status/planned We decided to do it.

Comments

@magohl
Copy link

magohl commented Mar 12, 2024

What problem did you meet?

Using a social connector of type OIDC i get the ConnectorError when the token response has property expires_in as a string and not a number. The RFC/specification state that this should be a number so LogTo is correct but several other solutions are more forgiving.

{ "path":["expires_in"], "message": "Expected number, received string" }

Describe what you'd like Logto to have

The ability to configure/override the default behavior on the OIDC social connector allowing expires_in as a string.

@darcyYe
Copy link
Contributor

darcyYe commented Mar 13, 2024

Hi @magohl , thanks for reporting this issue, will record this and make the string-typed timestamp also compatible. Would you like to let us know what IdP you are using?

@darcyYe darcyYe self-assigned this Mar 13, 2024
@simeng-li simeng-li added the pending-verification Something is still under investigation label Mar 15, 2024
@magohl
Copy link
Author

magohl commented Mar 21, 2024

Hi @darcyYe

Would you like to let us know what IdP you are using?

This specific test was with an national-id provider called Criipto. They have worked perfect with other services i have tried such as Authentik, IdentityServer, AAD B2C, Auth0, Ping etc.

Allowing string-typed expires_to would be great but otherwise maybe a way to override the parsing would be enough. Thanks for looking at this :)

@darcyYe
Copy link
Contributor

darcyYe commented Mar 28, 2024

Cool, will try to make the OIDC connector work with the IdP you mentioned. Not sure if there are some other issues except for the expires_in type mismatch. It could take few weeks since we have some ongoing projects. Will keep you posted once we have updates.
BTW, are you using OSS version or Logto Cloud? Since we have different release flow for them.

@darcyYe darcyYe added feature-request Something cool or not cool status/planned We decided to do it. and removed pending-verification Something is still under investigation labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Something cool or not cool status/planned We decided to do it.
Development

No branches or pull requests

3 participants