aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorkamtschatka <simon.schatka@gmx.at>2024-10-06 10:06:19 +0200
committerGitHub <noreply@github.com>2024-10-06 09:06:19 +0100
commit4a3775a9ac4242318dd7b91f0012cd756edcad7b (patch)
tree21811c995067527fa5ca0aeab22f7a28da8f1e45 /apps
parent8a1309536b76ba86872ca2e78aa695d9fd80c8cc (diff)
downloadkarakeep-4a3775a9ac4242318dd7b91f0012cd756edcad7b.tar.zst
feature: Allow disabling password signups (#413)
* [Feature Request] Allow to disable default password log in after SSO is configured #406 Added the DISABLE_LOCAL_SIGNUPS that can be used to force OAuth signups only * rename local signups to password signups --------- Co-authored-by: MohamedBassem <me@mbassem.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/web/components/signin/CredentialsForm.tsx3
-rw-r--r--apps/web/lib/clientConfig.tsx1
2 files changed, 3 insertions, 1 deletions
diff --git a/apps/web/components/signin/CredentialsForm.tsx b/apps/web/components/signin/CredentialsForm.tsx
index a505f699..a35b768f 100644
--- a/apps/web/components/signin/CredentialsForm.tsx
+++ b/apps/web/components/signin/CredentialsForm.tsx
@@ -233,7 +233,8 @@ export default function CredentialsForm() {
<SignIn />
</TabsContent>
<TabsContent value="signup">
- {clientConfig.auth.disableSignups ? (
+ {clientConfig.auth.disableSignups ||
+ clientConfig.auth.disablePasswordSignups ? (
<p className="text-center">Signups are currently disabled.</p>
) : (
<SignUp />
diff --git a/apps/web/lib/clientConfig.tsx b/apps/web/lib/clientConfig.tsx
index 31395199..90e6d35c 100644
--- a/apps/web/lib/clientConfig.tsx
+++ b/apps/web/lib/clientConfig.tsx
@@ -6,6 +6,7 @@ export const ClientConfigCtx = createContext<ClientConfig>({
demoMode: undefined,
auth: {
disableSignups: false,
+ disablePasswordSignups: false,
},
inference: {
inferredTagLang: "english",