1.1 KiB
1.1 KiB
Runbook: Auth OTP Failures
Symptoms
- Users do not receive OTP.
/api/auth/otp/requestor/api/auth/phone/requestfails./api/auth/otp/verifyor/api/auth/phone/verifyshows invalid/expired unexpectedly.
Impact
Users cannot sign in/verify phone; booking/payment flows may block.
Quick Checks
- Confirm
OTP_PROVIDERinbackend/salon_api/settings.py. - Check OTP provider credentials in
backend/.env. - Check app logs for provider/timeouts/rate-limit errors.
- Validate OTP rate-limit settings:
OTP_MAX_PER_WINDOWOTP_WINDOW_MINUTESOTP_RESEND_COOLDOWN_SECONDSPHONE_AUTH_IP_MAX_PER_WINDOWPHONE_AUTH_DEVICE_MAX_PER_WINDOW
Mitigation
- Fix env/config mismatch; restart API.
- If provider outage, use
consoleonly in non-prod. - If abuse spike/false positives, tune IP/device thresholds.
- Verify server clock and
OTP_EXPIRY_MINUTES.
Escalation
- Roll back recent auth changes if correlated with deployment.
- Escalate to Authentica with request IDs + timestamps.
References
- OTP logic:
backend/apps/accounts/services/otp.py - Risks:
docs/risks.md