diff --git a/dashboard/src/auth.ts b/dashboard/src/auth.ts index 3dd1efb7..bb5c1b9e 100644 --- a/dashboard/src/auth.ts +++ b/dashboard/src/auth.ts @@ -16,8 +16,8 @@ export const authGuard: NavigationGuard = async (to, from, next) => { export const loginCallbackGuard: NavigationGuard = async (to, from, next) => { if (to.query.apiKey) { - await RootStore.dispatch("auth/setApiKey", to.query.apiKey); - next("/dashboard"); + await RootStore.dispatch("auth/setApiKey", { key: to.query.apiKey }); + window.location.href = "/dashboard"; } else { window.location.href = `/?error=noAccess`; }