Merge pull request #2804 from Budibase/fix/redirect-loop-ff
fix firefox redirect loop
This commit is contained in:
commit
6dac3e28bd
|
@ -4,7 +4,7 @@
|
||||||
let upgradeModal
|
let upgradeModal
|
||||||
|
|
||||||
const onConfirm = () => {
|
const onConfirm = () => {
|
||||||
window.open("https://accounts.budibase.com/install", "_blank")
|
window.open("https://account.budibase.app/portal/install", "_blank")
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,23 @@
|
||||||
<script>
|
<script>
|
||||||
import { auth, admin } from "stores/portal"
|
import { auth, admin } from "stores/portal"
|
||||||
import { onMount } from "svelte"
|
|
||||||
import { redirect } from "@roxi/routify"
|
import { redirect } from "@roxi/routify"
|
||||||
|
|
||||||
// If already authenticated, redirect away from the auth section.
|
// If already authenticated, redirect away from the auth section.
|
||||||
// Check this onMount rather than a reactive statement to avoid trumping
|
// Check this onMount rather than a reactive statement to avoid trumping
|
||||||
// the login return URL functionality.
|
// the login return URL functionality.
|
||||||
onMount(() => {
|
if ($auth.user && !$auth.user.forceResetPassword) {
|
||||||
if ($auth.user && !$auth.user.forceResetPassword) {
|
$redirect("../")
|
||||||
$redirect("../")
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// redirect to account portal for authentication in the cloud
|
// redirect to account portal for authentication in the cloud
|
||||||
if (
|
if (
|
||||||
!$auth.user &&
|
!$auth.user &&
|
||||||
$admin.cloud &&
|
$admin.cloud &&
|
||||||
$admin.accountPortalUrl &&
|
$admin.accountPortalUrl &&
|
||||||
!$admin?.checklist?.sso?.checked
|
!$admin?.checklist?.sso?.checked
|
||||||
) {
|
) {
|
||||||
window.location.href = $admin.accountPortalUrl
|
window.location.href = $admin.accountPortalUrl
|
||||||
}
|
}
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if !$auth.user || $auth.user.forceResetPassword}
|
{#if !$auth.user || $auth.user.forceResetPassword}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue