add check after Login to redirect to resetpassword
This commit is contained in:
parent
fc45408d0f
commit
f050b65c45
|
@ -1,17 +1,17 @@
|
||||||
<script>
|
<script>
|
||||||
import { goto } from "@roxi/routify"
|
|
||||||
import {
|
import {
|
||||||
notifications,
|
ActionButton,
|
||||||
Input,
|
Body,
|
||||||
Button,
|
Button,
|
||||||
Divider,
|
Divider,
|
||||||
ActionButton,
|
|
||||||
Layout,
|
|
||||||
Body,
|
|
||||||
Heading,
|
Heading,
|
||||||
|
Input,
|
||||||
|
Layout,
|
||||||
|
notifications,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
|
import { goto } from "@roxi/routify"
|
||||||
|
import { auth, organisation } from "stores/portal"
|
||||||
import GoogleButton from "./GoogleButton.svelte"
|
import GoogleButton from "./GoogleButton.svelte"
|
||||||
import { organisation, auth } from "stores/portal"
|
|
||||||
|
|
||||||
let username = ""
|
let username = ""
|
||||||
let password = ""
|
let password = ""
|
||||||
|
@ -23,7 +23,11 @@
|
||||||
password,
|
password,
|
||||||
})
|
})
|
||||||
notifications.success("Logged in successfully")
|
notifications.success("Logged in successfully")
|
||||||
|
if ($auth?.user?.forceResetPassword) {
|
||||||
|
$goto("./reset")
|
||||||
|
} else {
|
||||||
$goto("../portal")
|
$goto("../portal")
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
notifications.error("Invalid credentials")
|
notifications.error("Invalid credentials")
|
||||||
|
|
Loading…
Reference in New Issue