
Auth0 React Native
Add Auth0 login to React Native or Expo CLI apps with react-native-auth0, env config, and native install steps including iOS pods.
Overview
auth0-react-native is an agent skill for the Build phase that integrates the react-native-auth0 SDK into React Native and Expo mobile apps.
Install
npx skills add https://github.com/auth0/agent-skills --skill auth0-react-nativeWhat is this skill?
- Install paths for Expo (expo install) and React Native CLI with pod-install for iOS
- Clear When NOT to Use matrix: Expo managed → auth0-expo, web → auth0-react, Next → auth0-nextjs
- Prerequisite handoff to auth0-quickstart when Auth0 tenant is not configured
- Native application type expectations and setup guide references for CLI automation
- Biometric-capable mobile auth positioning in skill metadata
Adoption & trust: 714 installs on skills.sh; 26 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need mobile login on iOS and Android but your agent keeps applying web or Expo-plugin Auth0 patterns that do not fit your React Native stack.
Who is it for?
Solo builders on React Native CLI or Expo workflows that use react-native-auth0 directly, with a Native-type Auth0 application.
Skip if: Expo managed apps that should use auth0-expo, React web SPAs, Next.js apps, pure backend APIs, or Swift/Kotlin-only native codebases.
When should I use this skill?
Adding authentication to React Native or Expo mobile apps with biometric support using react-native-auth0 and native deep linking.
What do I get? / Deliverables
After the skill runs, dependencies, env configuration, and platform setup steps are aligned so users can authenticate via Auth0 in your RN app.
- SDK install commands
- Environment variable layout
- Platform setup checklist (iOS pods, linking)
Recommended Skills
Journey fit
Mobile auth SDK wiring is an integration task during product build, before ship-time security review. Auth0 native SDK, deep linking, and env setup are third-party identity integrations—not generic frontend layout work.
How it compares
Identity integration skill for React Native—not JWT-only API middleware and not the Expo config-plugin variant.
Common Questions / FAQ
Who is auth0-react-native for?
Indie mobile developers shipping React Native or Expo apps who want Auth0-driven sign-in with the official react-native-auth0 SDK.
When should I use auth0-react-native?
In Build → Integrations while wiring login, tokens, and native linking—after you have an app shell and before ship security checks; use auth0-quickstart first if the tenant is missing.
Is auth0-react-native safe to install?
Check Prism’s Security Audits panel and never commit real Auth0 secrets; rotate credentials if an agent pasted live keys into the repo.
Workflow Chain
Requires first: auth0 quickstart
SKILL.md
READMESKILL.md - Auth0 React Native
# Auth0 React Native Integration Add authentication to React Native and Expo mobile applications using react-native-auth0. --- ## Prerequisites - React Native or Expo application - Auth0 account and application configured as Native type - If you don't have Auth0 set up yet, use the `auth0-quickstart` skill first ## When NOT to Use - **Expo managed workflow** - Use `auth0-expo` skill for Expo apps with config plugin - **React web applications** - Use `auth0-react` skill for SPAs (Vite/CRA) - **React Server Components** - Use `auth0-nextjs` for Next.js applications - **Non-React native apps** - Use platform-specific SDKs (Swift for iOS, Kotlin for Android) - **Backend APIs** - Use JWT validation libraries for your server language --- ## Quick Start Workflow ### 1. Install SDK **Expo:** ```bash npx expo install react-native-auth0 ``` **React Native CLI:** ```bash npm install react-native-auth0 npx pod-install # iOS only ``` ### 2. Configure Environment **For automated setup with Auth0 CLI**, see [Setup Guide](references/setup.md) for complete scripts. **For manual setup:** Create `.env`: ```bash AUTH0_DOMAIN=your-tenant.auth0.com AUTH0_CLIENT_ID=your-client-id ``` ### 3. Configure Native Platforms **iOS** - Update `ios/{YourApp}/Info.plist`: ```xml <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleTypeRole</key> <string>None</string> <key>CFBundleURLName</key> <string>auth0</string> <key>CFBundleURLSchemes</key> <array> <string>$(PRODUCT_BUNDLE_IDENTIFIER).auth0</string> </array> </dict> </array> ``` **Android** - Update `android/app/src/main/AndroidManifest.xml`: ```xml <activity android:name="com.auth0.android.provider.RedirectActivity" android:exported="true"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:host="YOUR_AUTH0_DOMAIN" android:pathPrefix="/android/${applicationId}/callback" android:scheme="${applicationId}" /> </intent-filter> </activity> ``` **Expo** - Update `app.json`: ```json { "expo": { "scheme": "your-app-scheme", "ios": { "bundleIdentifier": "com.yourcompany.yourapp" }, "android": { "package": "com.yourcompany.yourapp" } } } ``` ### 4. Add Authentication with Auth0Provider Wrap your app with `Auth0Provider`: ```typescript import React from 'react'; import { Auth0Provider } from 'react-native-auth0'; import App from './App'; export default function Root() { return ( <Auth0Provider domain={process.env.AUTH0_DOMAIN} clientId={process.env.AUTH0_CLIENT_ID} > <App /> </Auth0Provider> ); } ``` ### 5. Use the useAuth0 Hook ```typescript import React from 'react'; import { View, Button, Text, ActivityIndicator } from 'react-native'; import { useAuth0 } from 'react-native-auth0'; export default function App() { const { user, authorize, clearSession, isLoading } = useAuth0(); const login = async () => { try { await authorize({ scope: 'openid profile email' }); } catch (error) { console.error('Login error:', error); } }; const logout = async () => { try { await clearSession(); } catch (error) { console.error('Logout error:', error); } }; if (isLoading) { return <ActivityIndicator />; } return ( <View> {user ? ( <> <Text>Welcome, {user.name}!</Text>