Email Authentication
Rate Limits
Email verification is subject to the following rate limits:- 3 attempts per 10 minutes per email address
SMS Authentication
External JWT Authentication
For apps with existing authentication systems, you can authenticate users with an external JWT:Passkey Authentication
Sign in with a passkey:Authentication State
Monitor authentication state and get user information:Built-in UI
The easiest way to add authentication is using the built-in UI which handles all authentication methods:Best Practices
1. Error Handling
Always handle errors gracefully and provide clear feedback to users:2. User Experience
- Show loading states during authentication
- Provide clear error messages
- Allow users to resend OTP if needed
- Display the email/phone where OTP was sent
3. Security
- Never store OTP codes
- Always use HTTPS connections
- Implement proper session management
- Handle token refresh automatically
Troubleshooting
OTP Not Received
- Check that the email/phone number is valid
- Look in spam folder for email OTP
- Verify that the provider is enabled in Dynamic dashboard
- Check rate limits haven’t been exceeded
Authentication Fails
- Ensure OTP code is entered correctly
- Check that the code hasn’t expired (codes typically expire after 10 minutes)
- Verify network connectivity
- Check for any error messages in Logcat
Session Not Persisting
- Ensure you’re listening to
authenticatedUserChangesflow - Verify that the SDK is properly initialized
- Check that you’re not clearing app data
What’s Next
Now that you have authentication set up:- Social Authentication - Add social login options
- Session Management - Manage authenticated sessions with Kotlin Flow
- Wallet Operations - Work with user wallets
- MFA - Add multi-factor authentication