Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/oauth-flow.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test("OAuth 2.1 magic link flow", async ({ page, request }) => {
await expect(page).toHaveURL(/\/login/);

// Click through to the magic link form
await page.getByRole("button", { name: /Send Magic Link/i }).click();
await page.getByRole("button", { name: /Sign in with e-mail/i }).click();
await expect(page).toHaveURL(/\/login\/magic-link/);

// Submit email
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const MagicLinkButton = ({ callbackURL } = {}) => html`
<form method="get" action="/login/magic-link">
<input type="hidden" name="callbackURL" value="${callbackURL || ""}" />
<button type="submit" class="btn btn-cb-primary w-100">
Send magic link
Sign in with e-mail
</button>
</form>
`;
4 changes: 2 additions & 2 deletions src/app/routes/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function showMagicLinkForm(c) {

return c.html(
Layout({
title: "Magic Link Login",
title: "Sign in with e-mail",
children: html`
<div class="row justify-content-center">
<div class="col-md-6 col-lg-5">
Expand All @@ -68,7 +68,7 @@ function showMagicLinkForm(c) {
/>
</div>
<button type="submit" class="btn btn-cb-primary w-100">
Send magic link
Sign in with e-mail
</button>
</form>
</div>
Expand Down
3 changes: 2 additions & 1 deletion test/features/magic-links.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ test("magic links feature tests", async (t) => {

t.equal(res.status, 200, "magic link page loads");
const html = await res.text();
t.match(html, /Magic Link/i, "displays magic link heading");
t.match(html, /Sign in with e-mail/, "displays e-mail sign-in page");
t.match(html, /email/i, "has email input");
t.match(html, /Sign in with e-mail/, "shows e-mail sign-in button");
});

t.test("login page shows friendly message for INVALID_TOKEN", async (t) => {
Expand Down