Encode sign-in mail as base64 so webmail cannot mangle the verify token.
Quoted-printable still rewrote token= as token=3D in the raw MIME, which some clients never decode. Distinguish a missing token from a real expiry, and keep links valid for 60 minutes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -240,6 +240,14 @@ describe("LoginForm", () => {
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("shows URL-driven error for invalid_link", () => {
|
||||
navMock.searchParams = new URLSearchParams("error=invalid_link");
|
||||
renderLoginForm();
|
||||
expect(
|
||||
screen.getByText(/that sign-in link is not valid/i),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("calls router.replace to clear error query when user types (full-page /login)", async () => {
|
||||
const user = userEvent.setup();
|
||||
navMock.pathname = "/login";
|
||||
|
||||
Reference in New Issue
Block a user