Skip to main contentPrerequisites
- API running locally or deployed
BETTER_AUTH_URL and EXPO_PUBLIC_API_URL aligned
Steps
- Identify the failing provider (Apple, Google, or Email OTP)
- Confirm the API is reachable from the device
- Check API logs for the request
- Verify env vars and callback URLs
Troubleshooting
- OAuth state mismatch: ensure API and mobile use the same base URL. Mixing
http://192.168.x.x:3001 on mobile with an ngrok URL on the API will fail.
- Invalid client: confirm
GOOGLE_WEB_CLIENT_ID (backend) and
EXPO_PUBLIC_GOOGLE_IOS_CLIENT_ID / EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID
(mobile) match the credentials you created.
- Provider not found: the API only enables Google or Apple if the required
env vars are present. Double-check
GOOGLE_WEB_CLIENT_ID,
GOOGLE_CLIENT_SECRET, and the Apple env values, then restart the API.
- Callback 404: check
/api/auth/callback/* routes are reachable and that
BETTER_AUTH_URL is set to the same origin used by the device.
- Session not persisting: confirm you are using a development build (not
Expo Go) and that SecureStore is available on the device.
- Email OTP not sending: verify
RESEND_API_KEY and that your sender domain
is verified in Resend for production.
Need help?
If you run into any auth issues you cannot resolve, email
[email protected] with:
- Which provider failed (Apple, Google, Email OTP)
- The exact error message or screenshot
- Whether you are testing locally or on a deployed API
- The device and platform (iOS simulator, Android device, etc.)