Merged in feature/refresh-token (pull request #401)

feat: SW-101 Proactively refresh tokens

Approved-by: Michael Zetterberg
This commit is contained in:
Niclas Edenvin
2024-08-16 13:56:09 +00:00
parent 9f69e383e8
commit 819ac454b0
8 changed files with 167 additions and 67 deletions

12
constants/auth.ts Normal file
View File

@@ -0,0 +1,12 @@
/**
* How many seconds before the expiry of the access token
* the client should refresh the tokens
*/
export const PRE_REFRESH_TIME_IN_SECONDS = 30
/**
* How many minutes the client should be allowed to be inactive
* and still get the tokens refreshed. The inactivity control
* gets reset when the URL changes.
*/
export const MAX_KEEP_ALIVE_TIME_IN_MINUTES = 2 * 60