mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-24 06:28:34 +01:00
fix: redirect issues for authorized users (#374)
This commit is contained in:
@@ -106,8 +106,8 @@ class AuthContext implements IAuthContext {
|
|||||||
this._expiresAt.value = null;
|
this._expiresAt.value = null;
|
||||||
this._attachmentToken.value = null;
|
this._attachmentToken.value = null;
|
||||||
|
|
||||||
navigateTo("/");
|
|
||||||
console.log("Session invalidated");
|
console.log("Session invalidated");
|
||||||
|
window.location.href = "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
async login(api: PublicApi, email: string, password: string, stayLoggedIn: boolean) {
|
async login(api: PublicApi, email: string, password: string, stayLoggedIn: boolean) {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export default defineNuxtConfig({
|
|||||||
},
|
},
|
||||||
devOptions: {
|
devOptions: {
|
||||||
// Enable to troubleshoot during development
|
// Enable to troubleshoot during development
|
||||||
enabled: true,
|
enabled: false,
|
||||||
},
|
},
|
||||||
manifest: {
|
manifest: {
|
||||||
name: "Homebox",
|
name: "Homebox",
|
||||||
|
|||||||
@@ -8,6 +8,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
const ctx = useAuthContext();
|
const ctx = useAuthContext();
|
||||||
|
if (ctx.isAuthorized()) {
|
||||||
|
navigateTo("/home");
|
||||||
|
}
|
||||||
|
|
||||||
const api = usePublicApi();
|
const api = usePublicApi();
|
||||||
const toast = useNotifier();
|
const toast = useNotifier();
|
||||||
@@ -29,10 +32,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!ctx.isAuthorized()) {
|
|
||||||
navigateTo("/home");
|
|
||||||
}
|
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user