mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-16 02:35:12 +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:
@@ -93,6 +93,7 @@ describe("verify invite", () => {
|
||||
stub("zitadel.user.v2.UserService", "VerifyInviteCode");
|
||||
|
||||
cy.visit("/verify?userId=221394658884845598&code=abc&invite=true");
|
||||
cy.get("[data-testid=submit-button]").click();
|
||||
cy.url().should("include", Cypress.config().baseUrl + "/authenticator/set");
|
||||
});
|
||||
|
||||
@@ -105,6 +106,7 @@ describe("verify invite", () => {
|
||||
// TODO: Avoid uncaught exception in application
|
||||
cy.once("uncaught:exception", () => false);
|
||||
cy.visit("/verify?userId=221394658884845598&code=abc&invite=true");
|
||||
cy.get("[data-testid=submit-button]").click();
|
||||
cy.contains("Could not verify invite", { timeout: 10_000 });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -90,6 +90,7 @@ describe("verify email", () => {
|
||||
// TODO: Avoid uncaught exception in application
|
||||
cy.once("uncaught:exception", () => false);
|
||||
cy.visit("/verify?userId=221394658884845598&code=abc");
|
||||
cy.get("[data-testid=submit-button]").click();
|
||||
cy.contains("Could not verify email");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user