Merge branch 'dev' into feature/12-user-management

This commit is contained in:
2021-01-11 21:08:44 +01:00
4 changed files with 17 additions and 4 deletions

View File

@@ -27,6 +27,8 @@ const store = () => {
AuthService.authControllerRefresh({ token: state.auth.refresh_token }).then((auth) => {
console.log('got new auth');
OpenAPI.TOKEN = auth.access_token;
const jwtinfo = JSON.parse(atob(auth.access_token.split('.')[1]));
state.jwtinfo = jwtinfo;
localForage.setItem('logindata', auth);
});
},
@@ -39,8 +41,8 @@ const store = () => {
//
state.refreshInterval = setInterval(() => {
this.refreshAuth();
// 4min
}, 4 * 60000);
// 2min
}, 2 * 60000);
//
return state;
});