mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 07:30:20 +00:00
misc: simplified captcha flag and finalized build process
This commit is contained in:
@@ -122,8 +122,7 @@ const envSchema = z
|
||||
MAINTENANCE_MODE: zodStrBool.default("false"),
|
||||
|
||||
// CAPTCHA
|
||||
CAPTCHA_SECRET: zpStr(z.string().optional()),
|
||||
CAPTCHA_ENABLED: zodStrBool.default("false")
|
||||
CAPTCHA_SECRET: zpStr(z.string().optional())
|
||||
})
|
||||
.transform((data) => ({
|
||||
...data,
|
||||
|
||||
@@ -204,7 +204,7 @@ export const authLoginServiceFactory = ({
|
||||
if (
|
||||
user.consecutiveFailedPasswordAttempts &&
|
||||
user.consecutiveFailedPasswordAttempts >= 10 &&
|
||||
appCfg.CAPTCHA_ENABLED
|
||||
Boolean(appCfg.CAPTCHA_SECRET)
|
||||
) {
|
||||
if (!captchaToken) {
|
||||
throw new BadRequestError({
|
||||
|
||||
Reference in New Issue
Block a user