forked from mirrors/homebox
inject defaults + cleanup
This commit is contained in:
parent
9b46ea7874
commit
5f589f95b8
8 changed files with 212 additions and 85 deletions
|
@ -33,5 +33,14 @@ export const useAuthStore = defineStore('auth', {
|
|||
|
||||
return result;
|
||||
},
|
||||
/**
|
||||
* clearSession is used when the user cannot be logged out via the API and
|
||||
* must clear it's local session, usually when a 401 is received.
|
||||
*/
|
||||
clearSession() {
|
||||
this.token = '';
|
||||
this.expires = '';
|
||||
navigateTo('/');
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue