fix: show login when session token expires

This commit is contained in:
MSomnium Studios
2025-09-19 09:09:26 -04:00
committed by GitHub
parent 4ff247e134
commit e6c674b3c6
5 changed files with 45 additions and 3 deletions

View File

@@ -7,9 +7,11 @@ export const useAuthStore = defineStore("auth", {
state: (): {
user: IUser | null;
jwt: string;
logoutTimer: number | null;
} => ({
user: null,
jwt: "",
logoutTimer: null,
}),
getters: {
// user and jwt getter removed, no longer needed
@@ -37,5 +39,8 @@ export const useAuthStore = defineStore("auth", {
clearUser() {
this.$reset();
},
setLogoutTimer(logoutTimer: number | null) {
this.logoutTimer = logoutTimer;
},
},
});