Skip to content

Add passwordless magic-link sign-up and sign-in#38

Merged
kcdragon merged 1 commit into
mainfrom
add-email-signup
Jun 15, 2026
Merged

Add passwordless magic-link sign-up and sign-in#38
kcdragon merged 1 commit into
mainfrom
add-email-signup

Conversation

@kcdragon

Copy link
Copy Markdown
Collaborator

Adds passwordless authentication: users can sign up and sign in with email only, receiving a 30-minute magic link instead of using a password, alongside the existing password flow. password_digest is now nullable and User carries a :magic_link token tied to password_salt so the link auto-invalidates once a password is set or changed. A new MagicLinksController/MagicLinkMailer handle requesting and consuming sign-in links with honeypot, rate limiting, org-membership gating, and account-existence non-disclosure matching the existing auth controllers. Passwordless users can later add a password from a new account settings page (Users::PasswordsController), and a dev-only "Mailer previews" nav link was added. Full test coverage for the new controllers, mailer, and model behavior is included (103 tests passing, Rubocop and Brakeman clean).

🤖 Generated with Claude Code

Let users sign up and sign in with email only (no password) via a 30-minute
magic link, alongside the existing password flow. Passwordless accounts can
add a password later from a new account settings page.

- Make password_digest nullable; User uses has_secure_password
  validations: false with its own length/confirmation validations and a
  :magic_link token tied to password_salt (auto-invalidates on password change)
- MagicLinksController + MagicLinkMailer for requesting/consuming sign-in links,
  with honeypot, rate limiting, org-membership gating, and non-disclosure parity
- Users::PasswordsController settings page to add/change a password
- Dev-only "Mailer previews" nav link

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kcdragon kcdragon merged commit ac575eb into main Jun 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant