From 814ea013bc3e760db269ef182d84108083999f71 Mon Sep 17 00:00:00 2001 From: Cyrus Goh Date: Thu, 12 Dec 2024 16:14:44 +0800 Subject: [PATCH] clean up --- web-auth/src/components/Auth.svelte | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/web-auth/src/components/Auth.svelte b/web-auth/src/components/Auth.svelte index 49358d44cf3..7a274e9fd8a 100644 --- a/web-auth/src/components/Auth.svelte +++ b/web-auth/src/components/Auth.svelte @@ -30,8 +30,7 @@ let step: AuthStep = AuthStep.Base; let webAuth: WebAuth; - $: isLegacy = false; - $: isSignup = false; + // $: isLegacy = false; function isDomainDisabled(email: string): boolean { return disableForgotPassDomainsArr.some((domain) => @@ -58,12 +57,19 @@ decodeURIComponent(escape(window.atob(configParams))), ) as Config; - isSignup = config?.extraParams?.screen_hint === "signup"; + const isSignup = config?.extraParams?.screen_hint === "signup"; - if (cloudClientIDsArr.includes(config?.clientID)) { - isLegacy = true; + if (isSignup) { + step = AuthStep.SignUp; } + // UNCOMMENT to use `isLegacy` for rill dash check if needed + // NOTE: Check for cloud client ids from auth0 to allow sign up and login + // NOTE: Prevent rill dash (legacy) users from signing up + // if (cloudClientIDsArr.includes(config?.clientID)) { + // isLegacy = true; + // } + const authOptions: AuthOptions = Object.assign( { overrides: {