npm / @better-auth/expo
@better-auth/expo
What changed in @better-auth/expo 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
5 breaking13 security2 new APIs and options1 performance1 behavior and defaults9 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@better-auth/expo 131 changes
Breaking changes 5
When OAuth state is stored in a cookie, authorization URLs without a state parameter are rejected, matching the behavior with default database storage.
The Expo authorization proxy redirects only to configured social or generic OAuth authorization endpoint origins, or SSO provider origins in trustedOrigins. Add an SSO identity provider's origin to trustedOrigins if sign-in fails.
Custom storage implementations must provide both synchronous and asynchronous SecureStore methods.
getCookie() now returns a promise, using asynchronous SecureStore access to prevent synchronous crashes when iOS Keychain storage is unavailable.
Rejects redirect and callback targets that are not in trustedOrigins.
Security 13
The Expo authorization proxy sets the cookie only for an unexpired state issued by the server.
Leftover session data is cleared from secure storage after upgrades or sign-out.
Prevents Expo apps from sending unauthenticated requests while large stored cookies are being updated, and restores the previous cookie value if an update is interrupted or incomplete.
@better-auth/drizzle-adapter: Concurrent requests can exceed rate limits on PostgreSQL
@better-auth/scim: account takeover and stale access via SCIM provider-id collision
@better-auth/stripe: cross-organization billing tampering in organization subscription actions
@better-auth/oauth-provider's OAuth authorization-code grant allows concurrent redemption when two token requests race the find-then-delete primitive
Better Auth: OAuth refresh-token rotation forks the token family on concurrent redemption
@better-auth/sso provider registration has server-side request forgery via unvalidated OIDC endpoints
@better-auth/sso: SSO provider may allow registration for any org member without a checking their role
Better Auth: Stale sessions persist after user deletion across admin, anonymous, and SCIM flows
OAuth 2.1 Provider: Unprivileged users can register OAuth clients
Better Auth Passkey Plugin allows passkey deletion through IDOR
New APIs and options 2
This function is now exported for plugins that look up OAuth state records.
The plugin interface gains an optional version field, and built-in plugins expose their version.
Performance 1
Plugin packages no longer import from the better-auth root, preventing bundlers that split code from emitting unused Kysely chunks when used with better-auth/minimal.
Behavior and default changes 1
Cached session data is read from SecureStore on app startup to eliminate the login screen flash for returning users.
Fixes and other changes 9
@better-auth/expo now uses the copy of better-call installed by better-auth, so an Expo app no longer gets a second copy.
The Expo authorization proxy no longer logs a provider configuration error on every OAuth sign-in when a social provider is set up for ID token sign-in only, such as Apple without a client secret.
Social account linking with an ID token now sends the Expo origin header, allowing native link flows with a session cookie to pass origin validation.
Prevents corrupted cookies during concurrent updates.
Session data containing multibyte characters is stored safely in Expo secure storage.
Expo client plugins now compose with createAuthClient without TypeScript errors, and the resulting client preserves each plugin's inferred actions.
storageAdapter.setItem() is synchronous; use setItemAsync() when the write must be awaited.
Restores client plugin declaration compatibility for downstream TypeScript consumers.
Expo apps now include the stored session cookie when linking a social account with an ID token.