fullauth / DOCS / React Native / Setup
GitHub

DOCUMENTATION / REACT NATIVE

React Native installation

The published React Native package provides session context and helpers that store session tokens in AsyncStorage. The examples below use Expo; the helper package does not create an Expo project for you.

Create an Expo project

Terminal

npx create-expo-app my-app

Install packages

npm install @fullauth/core @fullauth/react-native

The package manifest declares React Native and AsyncStorage dependencies/peers. Use a React Native version compatible with the package’s peer requirements.

Set the backend origin

Use the origin of the server that runs the FullAuth route handler. This public URL is not a secret.

.env

EXPO_PUBLIC_FULLAUTH_URL=https://auth.example.com

Wrap the app in SessionProvider

baseUrl is optional in the provider and can fall back to EXPO_PUBLIC_FULLAUTH_URL; passing it explicitly makes the backend origin clear.

App.tsx

import { SessionProvider } from '@fullauth/react-native';
import { StatusBar } from 'expo-status-bar';
import { View } from 'react-native';
import Home from './screens/home';

const baseUrl = process.env.EXPO_PUBLIC_FULLAUTH_URL!;

export default function App() {
  return (
    <SessionProvider baseUrl={baseUrl}>
      <View style={{ flex: 1 }}>
        <Home />
        <StatusBar style="auto" />
      </View>
    </SessionProvider>
  );
}

Next steps

Continue with React Native usage and the Next.js backend setup. The built-in Google provider’s mobile callback path is present in source, but the included React Native helper does not complete its OAuth redirect flow; see the Google provider limitations.