Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
IchthysMaranathaCopy authored Mar 13, 2024
1 parent 59fa10e commit 7bf1784
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions packages/builder/src/pages/builder/auth/login.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@
$: cloud = $admin.cloud
if ($organisation.isSSOEnforced) {
organisation.init().oidc.init()
if (organisation.oidc) {
const url = `/api/global/auth/${$auth.tenantId}/oidc/configs/${$oidc.uuid}`
window.location = url
}
organisation
.init()
.then(() => oidc.init())
.then(() => {
const url = `/api/global/auth/${$auth.tenantId}/oidc/configs/${$oidc.uuid}`
window.location = url
})
}
async function login() {
Expand Down Expand Up @@ -61,14 +63,16 @@
if (evt.key === "Enter") login()
}
onMount(async () => {
try {
await organisation.init()
} catch (error) {
notifications.error("Error getting org config")
}
loaded = true
})
if (!$organisation.isSSOEnforced) {
onMount(async () => {
try {
await organisation.init()
} catch (error) {
notifications.error("Error getting org config")
}
loaded = true
})
}
</script>
<svelte:window on:keydown={handleKeydown} />
Expand Down

0 comments on commit 7bf1784

Please sign in to comment.