Compare commits
2 Commits
ee01c3a059
...
be629e5c6b
Author | SHA1 | Date | |
---|---|---|---|
be629e5c6b | |||
63569684a3 |
@ -27,6 +27,8 @@ const store = () => {
|
|||||||
AuthService.authControllerRefresh({ token: state.auth.refresh_token }).then((auth) => {
|
AuthService.authControllerRefresh({ token: state.auth.refresh_token }).then((auth) => {
|
||||||
console.log('got new auth');
|
console.log('got new auth');
|
||||||
OpenAPI.TOKEN = auth.access_token;
|
OpenAPI.TOKEN = auth.access_token;
|
||||||
|
const jwtinfo = JSON.parse(atob(auth.access_token.split('.')[1]));
|
||||||
|
state.jwtinfo = jwtinfo;
|
||||||
localForage.setItem('logindata', auth);
|
localForage.setItem('logindata', auth);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -39,8 +41,8 @@ const store = () => {
|
|||||||
//
|
//
|
||||||
state.refreshInterval = setInterval(() => {
|
state.refreshInterval = setInterval(() => {
|
||||||
this.refreshAuth();
|
this.refreshAuth();
|
||||||
// 4min
|
// 2min
|
||||||
}, 4 * 60000);
|
}, 2 * 60000);
|
||||||
//
|
//
|
||||||
return state;
|
return state;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user