Add SMS consent logging for Twilio compliance
Log phone, IP, and user agent to sms_consents table before sending verification SMS. Add disclosure text to login form. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -121,6 +121,11 @@ func (s *Server) handleLoginSubmit(w http.ResponseWriter, r *http.Request) {
|
||||
log.Printf("failed to send verification email to %s: %v", identifier, err)
|
||||
}
|
||||
} else {
|
||||
s.q.CreateSmsConsent(r.Context(), db.CreateSmsConsentParams{
|
||||
Phone: identifier,
|
||||
IpAddress: r.RemoteAddr,
|
||||
UserAgent: r.UserAgent(),
|
||||
})
|
||||
if err := sendVerificationSMS(identifier, code); err != nil {
|
||||
log.Printf("failed to send verification SMS to %s: %v", identifier, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user