[PR #5646] feat(expo): error handling when not set #14384

Open
opened 2026-04-13 09:26:55 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/better-auth/better-auth/pull/5646

State: open
Merged: No


This PR adds error handling when expo() is not set in auth.ts on server side.

Related issue #5600.


Summary by cubic

Show a helpful error in native Expo apps when the server isn’t configured with expo(). Prevents silent failures by logging guidance during auth calls.

  • Bug Fixes
    • Added onError in the Expo client to log a clear configuration error (with docs link) when a 403 occurs on /sign-in, /sign-up, or /get-session and the request has the expo-origin header. Runs only on native (not web).
    • Added a test that verifies the console error includes guidance to add expo() on the server.

Written for commit 38b7466170. Summary will update on new commits.

**Original Pull Request:** https://github.com/better-auth/better-auth/pull/5646 **State:** open **Merged:** No --- This PR adds error handling when `expo()` is not set in `auth.ts` on server side. Related issue #5600. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Show a helpful error in native Expo apps when the server isn’t configured with `expo()`. Prevents silent failures by logging guidance during auth calls. - **Bug Fixes** - Added `onError` in the Expo client to log a clear configuration error (with docs link) when a 403 occurs on `/sign-in`, `/sign-up`, or `/get-session` and the request has the `expo-origin` header. Runs only on native (not web). - Added a test that verifies the console error includes guidance to add `expo()` on the server. <sup>Written for commit 38b7466170bc9cd2a58489da0b6ff195f3297e3e. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. -->
GiteaMirror added the pull-request label 2026-04-13 09:26:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#14384