mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-08 20:17:28 +02:00
🐛 Make identifier in verification tokens case insensitive (#919)
This commit is contained in:
parent
768b73c89a
commit
b10c64b7da
3 changed files with 25 additions and 7 deletions
|
@ -96,12 +96,6 @@ test.describe.serial(() => {
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
test.describe("login", () => {
|
|
||||||
test.afterEach(async ({ page }) => {
|
|
||||||
await page.goto("/logout");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
test("can login with magic link", async ({ page }) => {
|
test("can login with magic link", async ({ page }) => {
|
||||||
await page.goto("/login");
|
await page.goto("/login");
|
||||||
|
|
||||||
|
@ -155,5 +149,27 @@ test.describe.serial(() => {
|
||||||
|
|
||||||
await expect(page.getByText("Test User")).toBeVisible();
|
await expect(page.getByText("Test User")).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("allow using different case in email", async ({ page }) => {
|
||||||
|
await page.goto("/login");
|
||||||
|
|
||||||
|
await page
|
||||||
|
.getByPlaceholder("jessie.smith@example.com")
|
||||||
|
.type("Test@example.com");
|
||||||
|
|
||||||
|
await page.getByRole("button", { name: "Continue" }).click();
|
||||||
|
|
||||||
|
const code = await getCode();
|
||||||
|
|
||||||
|
await page.getByPlaceholder("Enter your 6-digit code").type(code);
|
||||||
|
|
||||||
|
await page.getByRole("button", { name: "Continue" }).click();
|
||||||
|
|
||||||
|
await page.waitForURL("/polls");
|
||||||
|
|
||||||
|
await page.getByTestId("user-dropdown").click();
|
||||||
|
|
||||||
|
await expect(page.getByText("Test User")).toBeVisible();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "verification_tokens" ALTER COLUMN "identifier" SET DATA TYPE CITEXT;
|
|
@ -228,7 +228,7 @@ model Comment {
|
||||||
}
|
}
|
||||||
|
|
||||||
model VerificationToken {
|
model VerificationToken {
|
||||||
identifier String
|
identifier String @db.Citext
|
||||||
token String @unique
|
token String @unique
|
||||||
expires DateTime
|
expires DateTime
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue