From 9f87207d668fbe0a2039c63803128fbe5916f993 Mon Sep 17 00:00:00 2001 From: kamtschatka Date: Sat, 12 Oct 2024 15:27:21 +0200 Subject: feature: Allow to disable default password login after SSO is configured. Fixes #406 (#502) * [Feature Request] Allow to disable default password log in after SSO is configured #406 changed the flag to also disallow logging in via password The extensions will also no longer be allowed to log in via username/password then * [Feature Request] Allow to disable default password log in after SSO is configured #406 added the error message for OAuth --- packages/shared/config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/shared') diff --git a/packages/shared/config.ts b/packages/shared/config.ts index 288becab..44b7e26d 100644 --- a/packages/shared/config.ts +++ b/packages/shared/config.ts @@ -10,7 +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"), + DISABLE_PASSWORD_AUTH: stringBool("false"), OAUTH_ALLOW_DANGEROUS_EMAIL_ACCOUNT_LINKING: stringBool("false"), OAUTH_WELLKNOWN_URL: z.string().url().optional(), OAUTH_CLIENT_SECRET: z.string().optional(), @@ -54,7 +54,7 @@ const serverConfigSchema = allEnv.transform((val) => { apiUrl: val.API_URL, auth: { disableSignups: val.DISABLE_SIGNUPS, - disablePasswordSignups: val.DISABLE_PASSWORD_SIGNUPS, + disablePasswordAuth: val.DISABLE_PASSWORD_AUTH, oauth: { allowDangerousEmailAccountLinking: val.OAUTH_ALLOW_DANGEROUS_EMAIL_ACCOUNT_LINKING, @@ -114,7 +114,7 @@ export const clientConfig = { demoMode: serverConfig.demoMode, auth: { disableSignups: serverConfig.auth.disableSignups, - disablePasswordSignups: serverConfig.auth.disablePasswordSignups, + disablePasswordAuth: serverConfig.auth.disablePasswordAuth, }, inference: { inferredTagLang: serverConfig.inference.inferredTagLang, -- cgit v1.2.3-70-g09d2