By: Michael Lynch <git@mtlynch.io>
Reduce coupling in email auth by consolidating duplicated code and moving types to proper packages - Delete NewTokenCreator (duplicated by NewSender); dev build uses NewSender with no-op email func - Remove AllowWithRateLimit param and ErrRateLimited from magiclogin; rate limiting stays in the outer LoginTokenCreator closure where the client IP is available - Move SMTP config types from domain package (little_moments) into magiclogin/loginmail/smtp - Move EmailMessage and SendFunc into magiclogin/loginmail - Extract mustParseSMTPConfig() in email_sender_prod.go to separate config parsing from wiring - Return token entry from prod LoginTokenCreator instead of silently discarding it Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>