From 7a51eba93cfa36fa68b116de47459b1f4cd3f846 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 7 Jul 2021 17:39:26 +0100 Subject: [PATCH] Add OIDC icon to login page --- .../auth/_components/OidcButton.svelte | 39 +++++++++++++++++++ .../src/pages/builder/auth/login.svelte | 2 + .../src/api/controllers/admin/configs.js | 1 + 3 files changed, 42 insertions(+) create mode 100644 packages/builder/src/pages/builder/auth/_components/OidcButton.svelte diff --git a/packages/builder/src/pages/builder/auth/_components/OidcButton.svelte b/packages/builder/src/pages/builder/auth/_components/OidcButton.svelte new file mode 100644 index 0000000000..46990b759e --- /dev/null +++ b/packages/builder/src/pages/builder/auth/_components/OidcButton.svelte @@ -0,0 +1,39 @@ + + + {#if show} + window.open("/api/admin/auth/oidc", "_blank")} + > +
+ oidc icon +

Sign in with OIDC

+
+
+ {/if} + + + \ No newline at end of file diff --git a/packages/builder/src/pages/builder/auth/login.svelte b/packages/builder/src/pages/builder/auth/login.svelte index 9fb984c73e..264962f3fa 100644 --- a/packages/builder/src/pages/builder/auth/login.svelte +++ b/packages/builder/src/pages/builder/auth/login.svelte @@ -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 @@ Sign in to {company} + Sign in with email diff --git a/packages/worker/src/api/controllers/admin/configs.js b/packages/worker/src/api/controllers/admin/configs.js index 2f62af18bb..d83be15667 100644 --- a/packages/worker/src/api/controllers/admin/configs.js +++ b/packages/worker/src/api/controllers/admin/configs.js @@ -205,6 +205,7 @@ exports.configChecklist = async function (ctx) { smtp: !!smtpConfig, adminUser, oauth: !!oauthConfig, + oidc: !!oidcConfig, } } catch (err) { ctx.throw(err.status, err)