dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Where to set JWT Refresh in Background

Open ykorzikowski opened this issue 3 years ago • 3 comments

Unfortunately, there is no documentation where to set this.

    This is probably caused by JWT refresh in the background, so if it expires while you are editing, it is refreshing. You can check your IDP configuration and key lifetime settings.

Originally posted by @mlsmaycon in https://github.com/netbirdio/netbird/issues/561#issuecomment-1314084438

ykorzikowski avatar Dec 12 '22 12:12 ykorzikowski

Hello @ykorzikowski, the dashboard is set to trigger automatically refresh 30 seconds before the token expires, see the code here.

If your token has a 90s expiration time, it will trigger the refresh after 60s. We think this is a good time to prevent expired token issues.

To update the token expiration, from 90s to something else, that must be done in your IDP, for Keycloak that is done by following this documentation.

mlsmaycon avatar Dec 12 '22 13:12 mlsmaycon

Hey @mlsmaycon

okay got it. Makes sense from developer perspective. But can't it be done a bit less destructive? Like preserving form data you are currently entering?

ykorzikowski avatar Dec 12 '22 14:12 ykorzikowski

@ykorzikowski could you please open a ticket for it on the dashboard repository? https://github.com/netbirdio/dashboard

mlsmaycon avatar Dec 15 '22 14:12 mlsmaycon