1
0
Fork 0
mirror of synced 2024-10-02 18:16:29 +13:00

Add OIDC icon to login page

This commit is contained in:
Peter Clement 2021-07-07 17:39:26 +01:00
parent cff2a9ad7d
commit 7a51eba93c
3 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,39 @@
<script>
import { ActionButton } from "@budibase/bbui"
import OidcLogo from "assets/oidc-logo.png"
import { admin } from "stores/portal"
let show = false
$: show = $admin.checklist?.oidc
</script>
{#if show}
<ActionButton
on:click={() => window.open("/api/admin/auth/oidc", "_blank")}
>
<div class="inner">
<img src={OidcLogo} alt="oidc icon" />
<p>Sign in with OIDC</p>
</div>
</ActionButton>
{/if}
<style>
.inner {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding-top: var(--spacing-xs);
padding-bottom: var(--spacing-xs);
}
.inner img {
width: 18px;
margin: 3px 10px 3px 3px;
}
.inner p {
margin: 0;
}
</style>

View file

@ -12,6 +12,7 @@
import { goto, params } from "@roxi/routify"
import { auth, organisation } from "stores/portal"
import GoogleButton from "./_components/GoogleButton.svelte"
import OidcButton from "./_components/OidcButton.svelte"
import Logo from "assets/bb-emblem.svg"
import { onMount } from "svelte"
@ -61,6 +62,7 @@
<Heading>Sign in to {company}</Heading>
</Layout>
<GoogleButton />
<OidcButton />
<Divider noGrid />
<Layout gap="XS" noPadding>
<Body size="S" textAlign="center">Sign in with email</Body>

View file

@ -205,6 +205,7 @@ exports.configChecklist = async function (ctx) {
smtp: !!smtpConfig,
adminUser,
oauth: !!oauthConfig,
oidc: !!oidcConfig,
}
} catch (err) {
ctx.throw(err.status, err)