From bd851c4d5470cbd06a5b373336614324dbcf5304 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sun, 5 Sep 2021 18:11:55 +0300 Subject: [PATCH] Fix dashboard login redirect --- dashboard/src/auth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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`; }