feat(auth): make password length configurable via env (min 5–30, max 30–128)
CI / check (push) Successful in 29s
CI / tests-imaging-browsers (push) Successful in 1m46s
CI / tests-integration (push) Successful in 1m47s
CI / tests-unit (push) Successful in 1m49s
CI / tests-quality (push) Successful in 44s
CI / tests-ui (push) Successful in 4m38s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 3m38s
CI / check (push) Successful in 29s
CI / tests-imaging-browsers (push) Successful in 1m46s
CI / tests-integration (push) Successful in 1m47s
CI / tests-unit (push) Successful in 1m49s
CI / tests-quality (push) Successful in 44s
CI / tests-ui (push) Successful in 4m38s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 3m38s
Add PASSWORD_MIN_LENGTH / PASSWORD_MAX_LENGTH (validated in src/env.ts) and a
shared passwordPolicy helper. The policy drives the zod schemas in register,
password reset and the admin create-user dialog, plus the live requirement
checks and strength meter in the register form.
Locale messages now interpolate the configured minimum via {min} instead of
hard-coding 12.
This commit is contained in:
1 parent
aef0939ee9
commit
9cf1eb615c
36 files changed
+227
-143
No files matched your search
@@ -1027,7 +1027,7 @@
|
||||
"confirmPassword": "Ripeti la password",
|
||||
"usernamePlaceholder": "Nome utente",
|
||||
"emailPlaceholder": "Email",
|
||||
"passwordPlaceholder": "Password (min 12 caratteri)",
|
||||
"passwordPlaceholder": "Password (min {min} caratteri)",
|
||||
"confirmPasswordPlaceholder": "Ripeti la password",
|
||||
"selectOutfit": "Scegli il tuo outfit",
|
||||
"termsAccept": "Ho 18+ anni e accetto i termini e regole di {hotel}.",
|
||||
@@ -1039,7 +1039,7 @@
|
||||
"termsError": "Devi accettare i termini e regole per registrarti.",
|
||||
"usernameError": "Il nome utente è obbligatorio.",
|
||||
"emailError": "Email valida obbligatoria.",
|
||||
"passwordError": "La password deve contenere almeno 12 caratteri",
|
||||
"passwordError": "La password deve contenere almeno {min} caratteri",
|
||||
"confirmPasswordError": "Le password non coincidono.",
|
||||
"termsRequired": "Devi accettare i termini e le regole.",
|
||||
"usernameRequired": "Il nome utente è obbligatorio.",
|
||||
@@ -1062,7 +1062,7 @@
|
||||
"strengthFair": "Discreta",
|
||||
"strengthGood": "Buona",
|
||||
"strengthStrong": "Forte",
|
||||
"passwordMinLength": "La password deve contenere almeno 12 caratteri",
|
||||
"passwordMinLength": "La password deve contenere almeno {min} caratteri",
|
||||
"passwordUpper": "La password deve contenere almeno una lettera maiuscola",
|
||||
"passwordLower": "La password deve contenere almeno una lettera minuscola",
|
||||
"passwordDigit": "La password deve contenere almeno una cifra",
|
||||
@@ -1097,10 +1097,10 @@
|
||||
"reset": {
|
||||
"title": "Imposta una nuova password",
|
||||
"subtitle": "Scegli una password robusta che non usi altrove.",
|
||||
"passwordPlaceholder": "Nuova password (min 12 caratteri)",
|
||||
"passwordPlaceholder": "Nuova password (min {min} caratteri)",
|
||||
"resetPassword": "Reimposta password",
|
||||
"backToLogin": "Torna all'accesso",
|
||||
"passwordMinLength": "La password deve contenere almeno 12 caratteri",
|
||||
"passwordMinLength": "La password deve contenere almeno {min} caratteri",
|
||||
"tooManyAttempts": "Troppi tentativi — riprova più tardi",
|
||||
"invalidLink": "Questo link di reimpostazione non è valido o è scaduto. Richiedine uno nuovo.",
|
||||
"failed": "Non è stato possibile reimpostare la password. Riprova."
|
||||
|
||||
Reference in new issue
Block a user