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

Open
opened 2026-04-15 21:26:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5646
Author: @okisdev
Created: 10/28/2025
Status: 🔄 Open

Base: mainHead: feat(expo)/error-handling-when-not-set


📝 Commits (1)

  • 38b7466 feat(expo): error handling when not set

📊 Changes

2 files changed (+77 additions, -0 deletions)

View changed files

📝 packages/expo/src/client.ts (+22 -0)
📝 packages/expo/test/expo.test.ts (+55 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5646 **Author:** [@okisdev](https://github.com/okisdev) **Created:** 10/28/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat(expo)/error-handling-when-not-set` --- ### 📝 Commits (1) - [`38b7466`](https://github.com/better-auth/better-auth/commit/38b7466170bc9cd2a58489da0b6ff195f3297e3e) feat(expo): error handling when not set ### 📊 Changes **2 files changed** (+77 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/expo/src/client.ts` (+22 -0) 📝 `packages/expo/test/expo.test.ts` (+55 -0) </details> ### 📄 Description 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. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 21:26:21 -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#23038