Fix dashboard login redirect
This commit is contained in:
parent
b966c1fa5b
commit
bd851c4d54
1 changed files with 2 additions and 2 deletions
|
@ -16,8 +16,8 @@ export const authGuard: NavigationGuard = async (to, from, next) => {
|
||||||
|
|
||||||
export const loginCallbackGuard: NavigationGuard = async (to, from, next) => {
|
export const loginCallbackGuard: NavigationGuard = async (to, from, next) => {
|
||||||
if (to.query.apiKey) {
|
if (to.query.apiKey) {
|
||||||
await RootStore.dispatch("auth/setApiKey", to.query.apiKey);
|
await RootStore.dispatch("auth/setApiKey", { key: to.query.apiKey });
|
||||||
next("/dashboard");
|
window.location.href = "/dashboard";
|
||||||
} else {
|
} else {
|
||||||
window.location.href = `/?error=noAccess`;
|
window.location.href = `/?error=noAccess`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue