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

Automatic token renewal with a maximum delay between 2 triggers #1243

Open
TheMaskedTurtle opened this issue Dec 14, 2023 · 3 comments
Open

Comments

@TheMaskedTurtle
Copy link

I am trying to prevent a session cookie to expire before the token are renewed. This could happen when the tokens have a longer TTL than the cookie session, then we can longer perform a silent renew of the tokens.

Is there a way to prevent that with the current API ?

Otherwise, would it be possible to add a new parameter in the OidcConfiguration to configure this maximum delay between 2 token renew processes ?

@guillaume-chervet
Copy link
Contributor

guillaume-chervet commented Dec 14, 2023

Hi @TheMaskedTurtle ,

Thank you for your issue.
You can configure the behavior by using

refresh_time_before_tokens_expiration_in_second: Number, // default is 120 seconds

Property.

If your token expirer after 1000 seconds and you set it to 400
Your token will be refreh after 600 seconds.

@TheMaskedTurtle
Copy link
Author

Hi @guillaume-chervet,

Thanks for your quick answer :)

Indeed it will do the trick. But it requires to know the token duration before configuring the application which is not necessarily the case. That's why ideally this parameter would not depend on the token duration itself.

@guillaume-chervet
Copy link
Contributor

Hi @TheMaskedTurtle , i understand your need. I need to think because i do not know how to resolve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants