Files
appwrite/app/controllers
harsh mahajan 9e2e80bd27 feat: add phone OTP password recovery endpoints
Adds two new endpoints for SMS OTP-based password recovery:

- POST /v1/account/recovery/phone — looks up an existing user by phone
  number, generates a 6-digit OTP (TOKEN_TYPE_PHONE_RECOVERY, expires
  in 15 minutes), and sends it via SMS. Supports project mock numbers
  for testing.
- PUT /v1/account/recovery/phone — verifies the OTP and resets the
  user's password, marking phoneVerification as true on success.

Also adds:
- TOKEN_TYPE_PHONE_RECOVERY = 11 constant
- sms.recovery.body locale string in en.json

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 16:16:33 +05:30
..
2026-04-22 10:00:19 +02:00