Skip to main content
@kavachos/expo brings KavachOS auth to React Native and Expo apps. It stores session tokens in any storage adapter you choose. AsyncStorage, SecureStore, or your own, and sends them via Authorization header rather than cookies.

Installation

You also need a storage library. The most common choices:

Setup

1

Wrap your app

The storage prop accepts any object with getItem, setItem, and removeItem methods, the same interface as AsyncStorage and expo-secure-store.
2

Use the hooks

Secure token storage

For production apps, use expo-secure-store to encrypt the session token at rest:
For OAuth flows in Expo, use the oauth-proxy plugin on your server alongside Linking.openURL on the client:

Hooks reference

useSession

useUser

useSignIn

useSignUp

useSignOut

useAgents

Manages agent identity records for the current user. Requires the full base URL (same as the provider config).

KavachExpoConfig

The default in-memory storage loses the session when the app restarts. Always pass a real storage adapter in production.
Last modified on April 29, 2026