1
0
Fork 0
mirror of synced 2024-07-06 06:50:49 +12:00

fix login page

This commit is contained in:
Keviin Åberg Kultalahti 2021-05-21 13:33:05 +02:00
parent 093e52a4b7
commit 31968556ad

View file

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