
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@authon/react-native
Advanced tools
English | 한국어
Drop-in React Native authentication with secure token storage — Auth0 alternative
Before installing the SDK, create an Authon project and get your API keys:
Create a project at Authon Dashboard
Get your API keys from Project Settings → API Keys
pk_live_...) — use in your frontend codepk_test_...) — for development, enables Dev TeleportConfigure OAuth providers (optional) in Project Settings → OAuth
https://api.authon.dev/v1/auth/oauth/redirectTest vs Live keys: Use
pk_test_...during development. Switch topk_live_...before deploying to production. Test keys use a sandbox environment with no rate limits.
npm install @authon/react-native react-native-svg
npx expo install expo-secure-store expo-web-browser
// App.tsx — complete working file
import React, { useState } from 'react';
import { View, Text, Button, TextInput, ActivityIndicator } from 'react-native';
import { AuthonProvider, useAuthon, useUser } from '@authon/react-native';
import * as SecureStore from 'expo-secure-store';
const storage = {
getItem: (key: string) => SecureStore.getItemAsync(key),
setItem: (key: string, value: string) => SecureStore.setItemAsync(key, value),
removeItem: (key: string) => SecureStore.deleteItemAsync(key),
};
function HomeScreen() {
const { isLoaded, isSignedIn, user, signIn, signOut } = useAuthon();
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
if (!isLoaded) return <ActivityIndicator />;
if (isSignedIn) {
return (
<View style={{ padding: 24 }}>
<Text>Welcome, {user?.displayName ?? user?.email}</Text>
<Button title="Sign Out" onPress={signOut} />
</View>
);
}
return (
<View style={{ padding: 24, gap: 12 }}>
<TextInput placeholder="Email" value={email} onChangeText={setEmail} autoCapitalize="none" />
<TextInput placeholder="Password" value={password} onChangeText={setPassword} secureTextEntry />
<Button title="Sign In" onPress={() => signIn({ strategy: 'email_password', email, password })} />
</View>
);
}
export default function App() {
return (
<AuthonProvider
publishableKey="pk_live_YOUR_PUBLISHABLE_KEY"
storage={storage}
>
<HomeScreen />
</AuthonProvider>
);
}
import { Linking } from 'react-native';
import { useAuthon } from '@authon/react-native';
function GoogleButton() {
const { startOAuth, completeOAuth } = useAuthon();
const handlePress = async () => {
const { url, state } = await startOAuth('google');
await Linking.openURL(url);
await completeOAuth(state);
};
return <Button title="Sign in with Google" onPress={handlePress} />;
}
import * as WebBrowser from 'expo-web-browser';
import { useAuthon } from '@authon/react-native';
function GoogleButton() {
const { startOAuth, completeOAuth } = useAuthon();
const handlePress = async () => {
const { url, state } = await startOAuth('google', {
flow: 'redirect',
returnTo: 'https://your-domain.com/mobile-callback',
});
const pollPromise = completeOAuth(state);
await WebBrowser.openAuthSessionAsync(url, 'myapp://oauth-callback');
await pollPromise;
};
return <Button title="Sign in with Google" onPress={handlePress} />;
}
import { useUser } from '@authon/react-native';
function Profile() {
const { isLoaded, isSignedIn, user } = useUser();
if (!isLoaded) return <ActivityIndicator />;
if (!isSignedIn) return <Text>Not signed in</Text>;
return <Text>Email: {user?.email}</Text>;
}
const { signIn } = useAuthon();
await signIn({ strategy: 'email_password', email: 'user@example.com', password: 'MyP@ssw0rd' });
const { signOut } = useAuthon();
await signOut();
| Variable | Required | Description |
|---|---|---|
AUTHON_PUBLISHABLE_KEY | Yes | Project publishable key (pk_live_... or pk_test_...) |
AUTHON_API_URL | No | Optional — defaults to api.authon.dev |
| Component | Description |
|---|---|
<AuthonProvider> | Provider with publishableKey, apiUrl, storage |
<SocialButtons> | Renders all enabled OAuth provider buttons |
<SocialButton> | Single OAuth provider button with icon |
| Hook | Returns |
|---|---|
useAuthon() | { isLoaded, isSignedIn, user, signIn, signUp, signOut, getToken, providers, branding, startOAuth, completeOAuth, on, client } |
useUser() | { isLoaded, isSignedIn, user } |
useAuthonWeb3() | Web3 wallet auth |
useAuthonPasswordless() | OTP and magic link |
useAuthonPasskeys() | Passkey registration and auth |
| Feature | Authon | Clerk | Auth0 |
|---|---|---|---|
| Pricing | Free | $25/mo+ | $23/mo+ |
| React Native | Yes | Yes | Yes |
| Secure token storage | Yes | Yes | Yes |
| Web3 auth | Yes | No | No |
| MFA/Passkeys | Yes | Yes | Yes |
MIT
FAQs
Authon React Native SDK — mobile authentication
The npm package @authon/react-native receives a total of 32 weekly downloads. As such, @authon/react-native popularity was classified as not popular.
We found that @authon/react-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.