buildmymcpserver/apps/api/src/routes
Marco Sadjadi b248adf5c0
All checks were successful
Deploy to Production / deploy (push) Successful in 54s
feat(auth): email login soft-disabled until SMTP/Resend is wired
Closes the dependency on an unbuilt email sender. New EMAIL_AUTH_ENABLED
env flag (default false). When off:

- POST /v1/auth/magic-link  → 503 email_auth_disabled
- POST /v1/auth/verify       → 503 email_auth_disabled
- GET  /v1/auth/providers    → { email: false, sms, google, github }
- Login page: hides the email/phone tab toggle (only one method),
  hides the email form entirely, defaults to SMS/phone tab

Flipping EMAIL_AUTH_ENABLED=true re-enables the magic-link routes and
re-shows the email form section. Schema (magic_links table) unchanged
so this is a 1-env-flip re-enable, not a re-implementation.

SECURITY: closes audit finding Za-001 (account-takeover via
cross-provider email lookup). Without a magic-link flow, an attacker
who controls a target's inbox can no longer claim an existing
OAuth-created account. The remaining provider-mixing surface (Google
↔ GitHub at same email) requires controlling the OAuth provider
account itself, which is each provider's own security boundary.

Active login methods now: Google OAuth · GitHub OAuth · SMS code
(Twilio) · admin password (seeded, single user).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 18:51:57 +02:00
..
account.ts feat: user menu + profile page + in-app subscription management 2026-05-25 17:46:36 +02:00
admin.ts feat(auth): GitHub OAuth login + SMS one-time-code login 2026-05-21 22:59:58 +02:00
auth.ts feat(auth): email login soft-disabled until SMTP/Resend is wired 2026-05-25 18:51:57 +02:00
billing.ts feat: user menu + profile page + in-app subscription management 2026-05-25 17:46:36 +02:00
oauth.ts security: sovereign-audit Pass-2 fixes — auth-lib, oauth, templates 2026-05-25 18:15:54 +02:00
servers.ts security: sovereign-audit Phase 2 fixes — trustProxy, Docker hardening, banned-pattern overhaul 2026-05-25 18:02:59 +02:00
settings.ts feat(api,generator): preview endpoint + spec cache + audit-log writes 2026-05-19 18:08:29 +02:00
support.ts fix(admin): Support entry in sidebar + awaiting-admin badge 2026-05-25 17:23:33 +02:00
templates.ts security: sovereign-audit Pass-2 fixes — auth-lib, oauth, templates 2026-05-25 18:15:54 +02:00