Add email sign-in (magic link)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- authentication, backend
Research direction
Start with auth.ts to see the single Google provider and how provisionUser() is called, then read lib/auth/providers.ts and components/login-form.tsx. The work also touches lib/email/send.ts, lib/ratelimit.ts, and a new migration for the single-use token table. Done means a magic-link sign-in works end to end, tokens are single-use and expire, sends are rate-limited per email and per IP, and the plan/interval params survive the new path.
Written by the indexing model from the issue text.
Description
Copied from DeadantCo/answerLoops#18 · originally opened by sethr07 on 2026-11-20
Copied from https://github.com/answerLoops/answerLoops/issues/30 — originally opened by
@NathanTarberton 2026-08-20
What
Add email sign-in as a second login option alongside Google. Magic link (passwordless) rather than email+password.
Why
auth.ts configures exactly one OAuth provider — Google. There's no password field anywhere in the schema. Anyone without (or unwilling to use) a Google account can't sign in at all right now.
Magic link over password: no password hashing, reset-flow, or breach/strength-check surface to build or maintain — keeps the app's current no-password posture instead of adding a new attack surface (credential stuffing) it doesn't have today.
Scope
There's no Auth.js Adapter configured — JWT session strategy, a custom users table, no accounts/sessions/verificationTokens tables. So this is a custom flow, not NextAuth's built-in Email provider (which expects an Adapter). Concretely:
- New migration: single-use token table (email, hashed token, expiry, used-at)
- Magic-link email template in
lib/email/send.ts, reusing the existing Resend integration - A
Credentialsprovider inauth.tsthat verifies the token and calls the sameprovisionUser()the Google path already uses - Rate limiting on send via the existing
lib/ratelimit.ts— per-email and per-IP, since email-bombing is the abuse case - Build on
configuredSignInProvidersinlib/auth/providers.tsinstead of adding a second entry point incomponents/login-form.tsx; the page and sign-in action already read that list - Must carry
plan/intervalquery params through the new entry point the same way/logindoes for the Google path — a new sign-in path is another place that bug can reappear
Effort
S-M — roughly 1-2 days for one engineer. No adapter migration, no password infrastructure; the pieces being reused (Resend, rate limiting, provisionUser) already exist.
Related: #370 (closed; sign-in provider list shipped in #371), and the email and password issue #457.
Start here: new to the project? Read CONTRIBUTING.md first. It covers the ground rules, running answerLoops locally, and how to open a pull request.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DeadantCo/answerLoopsdev
-
Widget: match the chat bubble color to the rest of the widgetPossibly taken @sethr07 claimed this today. Openenhancement frontend help wanted
Difficulty 2/5 Half a day Newbie friendliness 75/100
DeadantCo/answerLoopsdev#68 · 3 comments ·
-
Widget: make the chat window fit on small phonesPossibly taken @sethr07 claimed this today. Openenhancement frontend good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DeadantCo/answerLoopsdev#67 · 9 comments ·
-
Add 'select all' option to Slack channel picker in SettingsPossibly taken @sethr07 claimed this today. Openfrontend good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DeadantCo/answerLoopsdev#22 · 5 comments ·
-
enhancement frontend help wanted
Difficulty 4/5 3-5 days Newbie friendliness 45/100
DeadantCo/answerLoopsdev#141 ·
-
backend enhancement frontend help wanted
Difficulty 4/5 3-5 days Newbie friendliness 45/100
DeadantCo/answerLoopsdev#140 ·
All issues in DeadantCo/answerLoopsdev
Similar issues
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 92/100
lingdojo/kana-dojo#34545 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
blocklist addition
Difficulty 1/5 Under an hour Newbie friendliness 82/100
MetaMask/eth-phishing-detect#315455 ·
Maintainers usually reply within 1 day
-
area: telegram bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
griffinwork40/agent-afk#5275 ·
Maintainers usually reply within 1 day
-
macOS: the Save Diagnostics panel goes behind the editor after an app switch and can't be reachedOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getopenscreen/openscreen#1667 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
erkamyaman/rust-anything#371 ·
Maintainers usually reply within 1 day