Skip to content

Commit

Permalink
Update OIDCButton.svelte
Browse files Browse the repository at this point in the history
  • Loading branch information
IchthysMaranathaCopy authored Mar 6, 2024
1 parent 438334d commit 01755ea
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import { oidc, organisation, auth } from "stores/portal"
import { onMount } from "svelte"
export let samePage
$: show = $organisation.oidc
let preDefinedIcons = {
Expand All @@ -35,11 +37,14 @@
{#if show}
<FancyButton
icon={src}
on:click={() =>
window.open(
`/api/global/auth/${$auth.tenantId}/oidc/configs/${$oidc.uuid}`,
"_blank"
)}
on:click={() => {
const url = `/api/global/auth/${$auth.tenantId}/oidc/configs/${$oidc.uuid}`
if (samePage) {
window.location = url
} else {
window.open(url, "_blank")
}
}}
>
{`Log in with ${$oidc.name || "OIDC"}`}
</FancyButton>
Expand Down

0 comments on commit 01755ea

Please sign in to comment.