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
feat(auth): harden the signup/login flow (verification, anti-abuse, OAuth, sessions)
Cohesive hardening of the public auth surface, no new dependencies or tables:
- Mandatory email verification with a magic link: a global `EnsureEmailVerified`
middleware gates page navigation until the address is confirmed; the signed
verification link verifies AND logs the user in, so it works when opened on
another device. Social logins/invites are already verified; self-hosted skips.
- Fix email-fixup: an unverified user who mistyped their email can correct it
and resend the link (`UpdateUnverifiedEmailController`).
- 45s resend cooldown with a countdown on the verify screen.
- Anti-abuse on register: throttle, an autofill-proof honeypot, disposable-email
blocking (`NotDisposableEmail`, config-extensible) and a per-IP daily quota.
- Close OAuth account-takeover: only link/create by email when the PROVIDER
confirmed it (Google `email_verified` claim; GitHub `/user/emails`).
- Password reset/change now drops active DB sessions, so an attacker with an
open session can't survive it.
- Uniform forgot-password response to stop email enumeration (+ throttle).
- `SecurityHeaders` middleware and a secure session cookie by default in prod.
- Strict email validation (`Email::defaults` strict + native) everywhere a new
email enters, so a@b / @localhost / whitespace are rejected before they bounce.
- Real-time password-strength meter on register and reset.
Covered by RegistrationAbuse, AuthHardening and OauthLinkingSecurity tests.
0 commit comments