Mobile / Core concepts
Native authentication
Handle the browser return path and stored sessions on mobile.
Setup and configuration
The mobile app uses the Better Auth Expo integration and native secure storage. API origin and app scheme must agree with the native configuration and the authentication server's allowed return flow.
EXPO_PUBLIC_API_URL=https://your-api.example
EXPO_PUBLIC_APP_SCHEME=starterkitImplementation workflow
Follow the existing native authentication client instead of copying web cookie assumptions into mobile. Open provider authentication through the configured browser flow, handle its callback, then resolve the authenticated session before presenting protected actions.
Keep cancelled sign-in distinct from successful sign-in. Clear the previous user's local presentation on sign-out and verify the server session can no longer perform protected work.
Verification and troubleshooting
Exercise cold-start callbacks, returning to a running app, cancelled sign-in, and expired sessions on the intended build. If the browser returns but the app remains signed out, inspect scheme matching and API reachability before changing provider configuration.