mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-01 03:52:14 +00:00
feat(login): add support for disabling automatic email verification (#11515)
# Which Problems Are Solved Enterprise email link scanners (used by organizations for security) pre-fetch URLs in emails to check for malicious content. In Login V2, email verification codes are automatically redeemed when the verification page loads. This causes link scanners to inadvertently consume one-time verification codes before users can click them, resulting in "code already used" errors. # How the Problems Are Solved - Changed the default behaviour so that verification codes are **not** auto-submitted on page load — users must click a Submit button to redeem the code - Added a new environment variable `NEXT_PUBLIC_AUTO_SUBMIT_CODE` that can be set to `true` to re-enable auto-submission for instances where link scanners are not a concern - The env var is named generically so it can be extended to other auto-submit flows (e.g. Email OTP) in the future # Additional Changes None # Additional Context Closes #11406
This commit is contained in:
@@ -144,4 +144,7 @@ Also ensure your login domain is registered on your instance by adding it as a [
|
||||
|
||||
If you want to enforce users to have their email verified, you can set the optional `EMAIL_VERIFICATION` variable to `true` in your environment and your users will be enforced to verify their email address before they can log in.
|
||||
|
||||
By default, verification codes are not automatically submitted on page load. This protects against enterprise email link scanners that pre-fetch URLs and could inadvertently consume one-time codes before users click them.
|
||||
If you want to enable automatic code submission (e.g. for a smoother UX when link scanners are not a concern), set `NEXT_PUBLIC_AUTO_SUBMIT_CODE` to `true`.
|
||||
|
||||

|
||||
|
||||
Reference in New Issue
Block a user