From 4a3775a9ac4242318dd7b91f0012cd756edcad7b Mon Sep 17 00:00:00 2001 From: kamtschatka Date: Sun, 6 Oct 2024 10:06:19 +0200 Subject: 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 --- packages/shared/config.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'packages/shared/config.ts') diff --git a/packages/shared/config.ts b/packages/shared/config.ts index b87babbd..288becab 100644 --- a/packages/shared/config.ts +++ b/packages/shared/config.ts @@ -10,6 +10,7 @@ const stringBool = (defaultValue: string) => const allEnv = z.object({ API_URL: z.string().url().default("http://localhost:3000"), DISABLE_SIGNUPS: stringBool("false"), + DISABLE_PASSWORD_SIGNUPS: stringBool("false"), OAUTH_ALLOW_DANGEROUS_EMAIL_ACCOUNT_LINKING: stringBool("false"), OAUTH_WELLKNOWN_URL: z.string().url().optional(), OAUTH_CLIENT_SECRET: z.string().optional(), @@ -53,6 +54,7 @@ const serverConfigSchema = allEnv.transform((val) => { apiUrl: val.API_URL, auth: { disableSignups: val.DISABLE_SIGNUPS, + disablePasswordSignups: val.DISABLE_PASSWORD_SIGNUPS, oauth: { allowDangerousEmailAccountLinking: val.OAUTH_ALLOW_DANGEROUS_EMAIL_ACCOUNT_LINKING, @@ -112,6 +114,7 @@ export const clientConfig = { demoMode: serverConfig.demoMode, auth: { disableSignups: serverConfig.auth.disableSignups, + disablePasswordSignups: serverConfig.auth.disablePasswordSignups, }, inference: { inferredTagLang: serverConfig.inference.inferredTagLang, -- cgit v1.2.3-70-g09d2