mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
#48: increase token exp safety factor from 1 to 5 min
This commit is contained in:
@ -34,7 +34,7 @@ export default function refreshTokenMiddleware({dispatch, getState}) {
|
||||
}
|
||||
|
||||
try {
|
||||
const SAFETY_FACTOR = 60; // ask new token earlier to overcome time dissynchronization problem
|
||||
const SAFETY_FACTOR = 300; // ask new token earlier to overcome time dissynchronization problem
|
||||
const jwt = getJWTPayload(token);
|
||||
|
||||
if (jwt.exp - SAFETY_FACTOR < Date.now() / 1000) {
|
||||
|
Reference in New Issue
Block a user