feat(auth): add configurable email verification enforcement

Auth:RequireEmailVerification (default off) gates whether local
register requires confirming email before login. OAuth new-user paths
are untouched -- Google/Microsoft already assert a verified email.
Adds verify-email and resend-verification-email endpoints, mirroring
the existing reset-password enumeration-avoidance and rate-limiting
patterns, plus a login-embedded resend affordance and a verify-email
landing page on the frontend.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
cesnimda
2026-07-13 01:22:26 +02:00
parent 0ca2f2b261
commit 904f3a8ec8
9 changed files with 528 additions and 3 deletions
+18
View File
@@ -764,6 +764,15 @@ export const translations = {
resetFailed: "Reset failed.",
backToLogin: "Back to login",
updatePassword: "Update password",
emailNotVerified: "Please verify your email address before signing in.",
resendVerificationEmail: "Resend verification email",
verificationEmailResent: "Verification email sent. Check your inbox.",
registerCheckEmailForVerification: "Check your email to verify your account.",
verifyEmailTitle: "Verify your email",
verifyEmailVerifying: "Verifying your email...",
verifyEmailSuccess: "Your email has been verified. You can now sign in.",
verifyEmailFailed: "This verification link is invalid or has expired.",
missingVerifyLinkInfo: "Missing user/token in link.",
jobTableSearch: "Search",
jobTableSearchPlaceholder: "Title, company, notes, messages",
jobTableStatus: "Status",
@@ -1792,6 +1801,15 @@ export const translations = {
resetFailed: "Tilbakestilling mislyktes.",
backToLogin: "Tilbake til innlogging",
updatePassword: "Oppdater passord",
emailNotVerified: "Vennligst bekreft e-postadressen din før du logger inn.",
resendVerificationEmail: "Send bekreftelses-e-post på nytt",
verificationEmailResent: "Bekreftelses-e-post sendt. Sjekk innboksen din.",
registerCheckEmailForVerification: "Sjekk e-posten din for å bekrefte kontoen.",
verifyEmailTitle: "Bekreft e-posten din",
verifyEmailVerifying: "Bekrefter e-posten din...",
verifyEmailSuccess: "E-posten din er bekreftet. Du kan nå logge inn.",
verifyEmailFailed: "Denne bekreftelseslenken er ugyldig eller har utløpt.",
missingVerifyLinkInfo: "Mangler bruker/token i lenken.",
jobTableSearch: "Søk",
jobTableSearchPlaceholder: "Tittel, selskap, notater, meldinger",
jobTableStatus: "Status",