1
0
Fork 0
mirror of synced 2024-10-03 02:27:06 +13:00

fix login page

This commit is contained in:
Keviin Åberg Kultalahti 2021-05-21 13:33:05 +02:00
parent a4de6d49c8
commit 9994c61f8f

View file

@ -9,7 +9,7 @@
Layout,
notifications,
} from "@budibase/bbui"
import { goto } from "@roxi/routify"
import { goto, params } from "@roxi/routify"
import { auth, organisation } from "stores/portal"
import GoogleButton from "./_components/GoogleButton.svelte"
@ -26,8 +26,13 @@
if ($auth?.user?.forceResetPassword) {
$goto("./reset")
} else {
if ($params["?returnUrl"]) {
window.location = decodeURIComponent($params["?returnUrl"])
} else {
notifications.success("Logged in successfully")
$goto("../portal")
}
}
} catch (err) {
console.error(err)
notifications.error("Invalid credentials")