MCPInstall

integrating-clerk-expo

Integrates Clerk authentication into React Native Expo apps using @clerk/clerk-expo. Covers ClerkProvider setup, secure token caching (expo-secure-store), Expo Router/React Navigation auth guards, custom sign-in/sign-up flows (email/password + email codes), SSO/OAuth (useSSO), Sign in with Apple (useSignInWithApple), biometrics (useLocalCredentials), offline support, and production deployment allowlisting. Use when the user mentions Clerk + Expo, @clerk/clerk-expo, Expo Router auth, SSO/OAuth redirects, or deploying Clerk in a mobile app.

Installs
73
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/tristanmanchester/agent-skills --skill integrating-clerk-expo
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads integrating-clerk-expo automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Clerk authentication in Expo (React Native)

Key constraints (read first)

  • Expo native apps do not support Clerk email links. Prefer email verification codes (email_code) or other strategies.
  • Clerk prebuilt UI components are not supported on Expo native. Use custom flows (your own screens) plus the control components: <ClerkLoaded>, <ClerkLoading>, <SignedIn>, <SignedOut>, <Protect>.
  • Default session tokens are in-memory; for native apps you almost always want a secure token cache (Expo SecureStore).

What this skill does

When implementing Clerk in an Expo app, follow these workflows to:

  • Install and configure @clerk/clerk-expo and environment keys
  • Wrap the app in <ClerkProvider> with a secure tokenCache
  • Build custom sign-in/sign-up screens (email + password, email codes)
  • Protect routes/screens in Expo Router or React Navigation
  • Add OAuth / Enterprise SSO flows via useSSO() (and fix redirect/deeplink pitfalls)
  • Add native Sign in with Apple (iOS, native build) via useSignInWithApple()
  • Add optional biometric re-auth via useLocalCredentials()
  • Optionally enable experimental offline bootstrapping via __experimental_resourceCache
  • Prepare for production deployment (domain + allowlisted redirect URLs)

Fast checklist (default: Expo Router)

Copy/paste and tick off:

  • In Clerk Dashboard, enable Native API for the application.
  • Install: @clerk/clerk-expo
  • Add .env: EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=...
  • Wrap the root with <ClerkProvider tokenCache={tokenCache}>
  • Install SecureStore and use Clerk’s tokenCache helper
  • Create (auth) route group with sign-in.tsx, sign-up.tsx, and an (auth)/_layout.tsx redirect guard
  • Add a sign-out button using useClerk().signOut()
  • Protect signed-in content using <SignedIn> / <SignedOut> / <Protect> or useAuth() + redirects
  • If using OAuth/SSO: implement useSSO() + expo-auth-session redirect URL + WebBrowser.maybeCompleteAuthSession()
  • If iOS Apple sign-in is required: native build + useSignInWithApple()
  • If you need resilience offline: __experimental_resourceCache={resourceCache} and handle network_error
  • Production: acquire a domain and allowlist mobile SSO redirect URLs

If you need full code examples, open:

  • references/QUICKSTART.md
  • references/CUSTOM_FLOWS.md
  • references/SSO_OAUTH.md
  • references/HOOKS_AND_COMPONENTS.md

Decide the routing setup

If the project uses Expo Router

Signals:

  • expo-router dependency
  • an app/ directory with route files like app/_layout.tsx

➡️ Follow: Expo Router workflow (below).

If the project uses React Navigation directly (no Expo Router)

Signals:

  • App.tsx with NavigationContainer and stacks
  • no app/ directory

➡️ Follow: React Navigation workflow (below).


Workflow A — Expo Router (recommended default)

1) Install + env key

  • Install @clerk/clerk-expo
  • Set EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY in .env

2) Root layout: ClerkProvider + secure token cache

In app/_layout.tsx (or the project’s root layout), wrap your app:

import { ClerkProvider } from '@clerk/clerk-expo'
import { tokenCache } from '@clerk/clerk-expo/token-cache'
import { Slot } from 'expo-router'

export default function RootLayout() {
  return (
    <ClerkProvider tokenCache={tokenCache}>
      <Slot />
    </ClerkProvider>
  )
}

Notes:

  • Ensure expo-secure-store is installed (required by the tokenCache helper).
  • Keep only the publishable key in the client.

3) Auth route group + redirect guard

Create app/(auth)/_layout.tsx that redirects signed-in users away from auth screens:

import { Redirect, Stack } from 'expo-router'
import { useAuth } from '@clerk/clerk-expo'

export default function AuthLayout() {
  const { isSignedIn } = useAuth()
  if (isSignedIn) return <Redirect href="/" />
  return <Stack />
}

4) Build custom sign-in / sign-up screens

Use Clerk hooks (useSignIn, useSignUp) and prefer email_code verification.

See:

  • references/CUSTOM_FLOWS.md

5) Protect signed-in routes

Options (pick one, don’t mix randomly):

  • Declarative: Wrap signed-in areas with <SignedIn> and <SignedOut>.
  • Gate a subtree: Use <Protect> around content that requires auth.
  • Imperative: In a layout, check useAuth() and <Redirect> to /sign-in.

See:

  • references/ROUTING.md

Workflow B — React Navigation (no Expo Router)

1) Wrap the root

Wrap your NavigationContainer (or your app root) with <ClerkProvider tokenCache={tokenCache}>.

2) Split navigation by auth state

  • While !isLoaded: render a splash/loading screen
  • When isSignedIn: render your “app” stack
  • Else: render your “auth” stack

See:

  • references/ROUTING.md

OAuth / Enterprise SSO in Expo (useSSO)

Use useSSO() for OAuth + enterprise SSO. In native, you must provide a valid redirect URL (often via AuthSession.makeRedirectUri(...)) and ensure your redirect URLs are allowlisted for production.

See:

  • references/SSO_OAUTH.md
  • references/DEPLOYMENT.md

Sign in with Apple (iOS native build)

useSignInWithApple() is iOS-only and requires a native build (won’t work in Expo Go). Always handle ERR_REQUEST_CANCELED.

See:

  • references/APPLE_SIGNIN.md

Biometrics (store local credentials)

useLocalCredentials() can store password credentials on-device and allow biometric sign-in later (Face ID / fingerprint). Only works for password-based sign-in attempts.

See:

  • references/BIOMETRICS.md

Passkeys

Clerk supports passkeys (WebAuthn). In Expo apps, you’ll integrate passkeys through custom flows; follow Clerk’s passkeys reference for the latest supported strategies and platform constraints.

See:

  • references/PASSKEYS.md

Offline support (experimental)

You can enable experimental offline bootstrapping via __experimental_resourceCache. Treat as experimental; add good error handling for network_error.

See:

  • references/OFFLINE_SUPPORT.md

Validation loop (recommended)

  1. Run the setup verifier:
python scripts/verify_expo_clerk_setup.py .
  1. Start Expo with a clean cache:
npx expo start -c
  1. Test flows:
  • fresh install → sign up → verify code → app screen
  • app restart → user still signed in (token cache working)
  • sign out → user returns to auth stack (token cleared)

THE EXACT PROMPT — Implement Clerk in an Expo app

Use this when delegating to another coding agent:

You are implementing Clerk authentication in a React Native Expo app.

1) Detect whether this app uses Expo Router (app/ directory) or React Navigation.
2) Install and configure @clerk/clerk-expo with EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY.
3) Wrap the root with <ClerkProvider tokenCache={tokenCache}> and ensure expo-secure-store is installed.
4) Implement custom sign-in and sign-up screens (email + password, with email verification code strategy 'email_code').
5) Protect signed-in routes appropriately for the chosen router.
6) If OAuth/SSO is requested, implement useSSO() with expo-auth-session redirectUrl and WebBrowser.maybeCompleteAuthSession().
7) Add sign-out.
8) Provide a short test plan and run scripts/verify_expo_clerk_setup.py.

Be precise and keep changes minimal. Do not use email link flows on native.

Quick search (when reading bundled references)

grep -Rni "useSSO" references/
grep -Rni "tokenCache" references/
grep -Rni "enterprise_sso" references/
grep -Rni "__experimental_resourceCache" references/

FAQ

What does the integrating-clerk-expo skill do?

Integrates Clerk authentication into React Native Expo apps using @clerk/clerk-expo. Covers ClerkProvider setup, secure token caching (expo-secure-store), Expo Router/React Navigation auth guards, custom sign-in/sign-up flows (email/password + email codes), SSO/OAuth (useSSO), Sign in with Apple (useSignInWithApple), biometrics (useLocalCredentials), offline support, and production deployment allowlisting. Use when the user mentions Clerk + Expo, @clerk/clerk-expo, Expo Router auth, SSO/OAuth redirects, or deploying Clerk in a mobile app.

How do I install integrating-clerk-expo?

Run npx skills add https://github.com/tristanmanchester/agent-skills --skill integrating-clerk-expo in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/integrating-clerk-expo/ (personal) or .claude/skills/integrating-clerk-expo/ (project).

Which AI agents can use integrating-clerk-expo?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is integrating-clerk-expo safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains integrating-clerk-expo?

It is published by tristanmanchester in tristanmanchester/agent-skills. It has 73 recorded installs.

More from tristanmanchester/agent-skills

View all →

designing-beautiful-websites

tristanmanchester/agent-skills

Design, implement, or critique website and web-app UX/UI: information structure, user flows, responsive layouts, visual systems, content, and interaction states. Use for a requested interface or visual-design change; do not expand a small component edit into an unrequested product redesign.

Frontend & Design2.8K installs

reddit-readonly

tristanmanchester/agent-skills

Browse and search Reddit in read-only mode using public JSON endpoints. Use when the user asks to browse subreddits, search for posts by topic, inspect comment threads, or build a shortlist of links to review and reply to manually.

Marketing & SEO432 installs

animating-react-native-expo

tristanmanchester/agent-skills

Implement and debug React Native or Expo motion with Reanimated 4 and Gesture Handler 3: state transitions, layout, gestures, scroll, worklets, cancellation, and accessible alternatives. Use for native UI motion, not web Motion or a reason to add canvas graphics to ordinary views.

Mobile416 installs

styling-nativewind-v4-expo

tristanmanchester/agent-skills

Set up, repair, and build components with NativeWind v4 and Tailwind CSS v3 in Expo React Native apps. Use for an explicitly v4 project, v4 configuration failures, className interoperability, or v4 theming; not for NativeWind v5 or generic web Tailwind setup.

Frontend & Design410 installs

nextjs-framer-motion-animations

tristanmanchester/agent-skills

Implement and debug Motion for React in Next.js: local interaction, presence, layout, shared elements, scroll, reduced motion, and router integration. Use for explicit Motion/Framer Motion work or interactions that need it; prefer CSS for simple effects and framework-native view transitions for supported route cases.

Frontend & Design177 installs

react-native-skia

tristanmanchester/agent-skills

Build, debug, or profile React Native Skia canvases, paths, rich text, shaders, images, snapshots, video, and animated graphics. Use when Skia is selected or custom drawing is needed. Do not introduce a canvas merely because ordinary native UI should look polished or animate smoothly.

Frontend & Design119 installs

Popular mobile skills

View category →

design-mobile-apps

designed-by-ai/skills

Design mobile app screens with Sleek, edit Sleek projects, and implement their designs in React Native or HTML.

Mobile1.1M installs

ios-design

uizze.sh

Design and review iOS UI/UX for iPhone apps in SwiftUI, UIKit, or React Native. Use for mobile app design, screen redesigns, navigation flows, typography, forms, keyboard and safe-area layout, and accessibility checks. Apply Apple Human Interface Guidelines and consult real product references through the optional Uizze connection.

Mobile416.5K installs

vercel-react-native-skills

vercel-labs/agent-skills

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

OfficialMobile256.7K installs

animate-expo

emilkowalski/skills

Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use animate.

Mobile140.1K installs

xcode-project-setup

firebase/agent-skills

Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).

OfficialMobile131.2K installs

firebase-remote-config-basics

firebase/agent-skills

Manages Firebase Remote Config templates, feature flags, loading strategies, and SDKs (Android, iOS). Use when downloading/deploying remoteconfig JSON templates, managing version history/feature flags, setting in-app defaults, fetchAndActivate(), real-time listeners, or SDK setup. Don't use for Firebase Hosting, Auth, Firestore, Data Connect, Crashlytics, or App Hosting.

OfficialMobile121.7K installs