clerk-expo-patterns

Implement Clerk authentication patterns for Expo and React Native apps.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/koushik-hait/xigenis-landingpage-v1 --skill clerk-expo-patterns-koushik-hait
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clerk-expo-patterns
Source: https://github.com/koushik-hait/xigenis-landingpage-v1/tree/main/.agents/skills/clerk-expo-patterns
Command: npx skills add https://github.com/koushik-hait/xigenis-landingpage-v1 --skill clerk-expo-patterns-koushik-hait

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the common challenge of integrating Clerk authentication into a React Native + Expo app while ensuring sessions persist, OAuth redirects work reliably, and protected routes behave correctly.

Core Features & Use Cases

  • Session persistence with secure token caching: Uses Expo SecureStore-backed token caching so users stay signed in after app restarts.
  • OAuth with deep linking: Implements Google/Apple/GitHub OAuth via Clerk’s useSSO hook and handles the callback using the app URL scheme.
  • Protected routes and user-aware UI: Guards Expo Router groups/screens with sign-in redirects using useAuth, and supports user context like profiles and organization switching.

Quick Start

Ask: “Show me how to wrap my Expo Router app with ClerkProvider using EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY and the SecureStore token cache so sessions survive restarts.”

Frequently Asked Questions about clerk-expo-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep Clerk users signed in after restarting an Expo app?

To keep Clerk users signed in after restarting an Expo app, implement persistent session token caching using Expo SecureStore. This securely stores session tokens locally so authentication state survives app restarts without requiring users to log in again.

How do I configure OAuth deep linking with Clerk in an Expo Router app?

OAuth deep linking with Clerk in an Expo Router app uses the useSSO hook for Google, Apple, or GitHub sign-in. You must correctly handle the callback by configuring your app URL scheme to catch the OAuth redirect and complete the authentication flow.

How do I create protected routes in Expo Router using Clerk?

Create protected routes in Expo Router using Clerk by guarding navigation groups with the useAuth hook. If a user is unauthenticated, the route redirects them to the sign-in screen, ensuring only authorized users access secure screens.

Do I need a specific version of @clerk/expo to use SecureStore token caching?

Yes, using SecureStore token caching requires @clerk/expo v3 or higher. You also need the Expo CLI and must wire the token cache via @clerk/expo/token-cache or a custom SecureStore-based TokenCache inside your ClerkProvider.

What is the best way to wrap an Expo Router app with ClerkProvider and a token cache?

The best way to wrap an Expo Router app is configuring ClerkProvider in your root layout using the EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY and wiring the SecureStore token cache. This setup ensures sessions survive app restarts reliably.