You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds `password_require_complexity` (toggle, default off) + `password_min_classes`
(1-4, default 3) auth settings. A custom validator runs in the better-auth
`before` hook on /sign-up/email, /reset-password, /change-password and rejects a
password using fewer than min_classes of the four character classes
(upper/lower/digit/symbol) with PASSWORD_POLICY_VIOLATION — better-auth natively
enforces only min/max length.
Default-off / additive (no upgrade behavior change); ADR-0049 (enforcement ships
with the setting); no new identity fields.
Verified live (dogfood): complexity OFF accepts a weak password; ON rejects a
lowercase-only password (400 PASSWORD_POLICY_VIOLATION) and accepts a 3-class
password, on BOTH /sign-up/email and /change-password (newPassword). Unit: 126
plugin-auth + 6 manifest tests green; builds incl. strict DTS green.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Adds `password_require_complexity` (toggle, default off) + `password_min_classes` (1–4, default 3) to the `auth` password-policy settings. A custom validator runs in the better-auth `before` hook on `/sign-up/email`, `/reset-password`, and `/change-password`, rejecting passwords that use fewer than `password_min_classes` of the four character classes (upper / lower / digit / symbol) with `PASSWORD_POLICY_VIOLATION` — better-auth natively enforces only min/max length.
9
+
10
+
Default-off and additive (no upgrade behavior change); per ADR-0049 the setting ships with its enforcement. No new identity fields. Continues the ADR-0069 P1 password-policy work alongside the HIBP breached-password reject (#2361).
0 commit comments