-
-
Notifications
You must be signed in to change notification settings - Fork 575
Description
Confirm you've already contributed to this project or that you sponsor it
- I confirm I'm a sponsor or a contributor
Version
5.7.0
Question
Hi Kevin,
I hope you’re well. I’m currently working with OpenIddict 5.7.0.
My main problem is this:
When the login page stays idle for around 15 minutes before the user even attempts to sign in, the system immediately returns the error:
Note
error: invalid_token
error_description: The specified token is no longer valid.
What is happening
- The login page loads successfully with a long authorization URL containing client_id, scope, code_challenge, nonce, and state.
- If I wait (e.g., 15 minutes or more) and then entering credentials, getting response in browser as:
EF Core queries OpenIddictTokens table using ReferenceId.
The failure seems related to the OpenIddict state token or nonce expiring too early during the authorization flow.
I have added options.SetAuthorizationCodeLifetime(TimeSpan.FromMinutes(30)); to see if there is any change, but no.
Below option is also not possible:
Could you please advise:
- How can we configure or extend the lifetime of the state and nonce tokens in OpenIddict 5.7.0?
- Are these lifetimes intentionally fixed?
- If they are not configurable, is there a recommended way to override or adjust the behaviour?
- Or is there any other way to fix above issue?
I appreciate your time and any guidance you can provide.
Kind regards