forked from mirrors/homebox
fix: redirect issues for authorized users (#374)
This commit is contained in:
parent
0264bfb8c1
commit
8c57ff841e
3 changed files with 5 additions and 6 deletions
|
@ -106,8 +106,8 @@ class AuthContext implements IAuthContext {
|
|||
this._expiresAt.value = null;
|
||||
this._attachmentToken.value = null;
|
||||
|
||||
navigateTo("/");
|
||||
console.log("Session invalidated");
|
||||
window.location.href = "/";
|
||||
}
|
||||
|
||||
async login(api: PublicApi, email: string, password: string, stayLoggedIn: boolean) {
|
||||
|
|
|
@ -20,7 +20,7 @@ export default defineNuxtConfig({
|
|||
},
|
||||
devOptions: {
|
||||
// Enable to troubleshoot during development
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
},
|
||||
manifest: {
|
||||
name: "Homebox",
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
});
|
||||
|
||||
const ctx = useAuthContext();
|
||||
if (ctx.isAuthorized()) {
|
||||
navigateTo("/home");
|
||||
}
|
||||
|
||||
const api = usePublicApi();
|
||||
const toast = useNotifier();
|
||||
|
@ -29,10 +32,6 @@
|
|||
}
|
||||
});
|
||||
|
||||
if (!ctx.isAuthorized()) {
|
||||
navigateTo("/home");
|
||||
}
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
|
|
Loading…
Reference in a new issue