Primary Backend Flow
- POST
/auth/signinwith email/password - Receive session cookie
- Include cookie in subsequent requests
Mobile Backend Flow
- POST
/auth/signinwith phone number → getaccessToken - POST
/auth/otp/createwithaccessToken→ OTP sent via SMS - POST
/auth/otp/validatewith OTP → getsessionToken - Use
sessionTokenfor API calls
Security Best Practices
Primary Backend- HttpOnly cookies prevent XSS
- Always use
credentials: 'include' - Enable CORS for your domain
- Store tokens in secure storage (Keychain/Keystore)
- Handle token expiration
- Implement OTP rate limiting