clerk-expo-patterns

Integrate Clerk authentication into Expo apps with SecureStore token caching.

Updated May 4, 2026
One-click install
npx skills add https://github.com/Endsi3g/Uprising-AOS --skill clerk-expo-patterns-endsi3g
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clerk-expo-patterns
Source: https://github.com/Endsi3g/Uprising-AOS/tree/main/.agents/skills/clerk-expo-patterns
Command: npx skills add https://github.com/Endsi3g/Uprising-AOS --skill clerk-expo-patterns-endsi3g

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It solves the challenge of integrating Clerk authentication into an Expo (React Native) app while ensuring sessions persist securely across restarts and that OAuth sign-in works correctly with deep links.

Core Features & Use Cases

  • Secure token persistence with SecureStore: Keeps the Clerk session alive after app restarts using a tokenCache backed by encrypted device storage.
  • Expo Router protected routes: Guards authenticated areas by using Clerk’s native useAuth flow and redirecting unauthenticated users.
  • OAuth deep linking flow: Implements Google (and other providers) sign-in using useSSO, redirectUrl, and WebBrowser.maybeCompleteAuthSession.
  • User context for mobile UI: Retrieves profile data with useUser and supports org switching via useOrganization and useOrganizationList.
  • Push notifications tied to the signed-in user: Registers Expo push tokens after authentication and associates them with the Clerk user.

Quick Start

Ask the AI to generate a ClerkProvider setup for Expo that uses EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY and configures the SecureStore-backed tokenCache so users stay signed in after restarting the app.

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 authentication sessions persistent in an Expo app?

To keep Clerk authentication sessions persistent in an Expo app, configure a tokenCache backed by SecureStore. This stores the session token in encrypted device storage, ensuring users stay signed in after the app restarts.

How do I set up Google OAuth deep linking with Clerk in Expo Router?

Setting up Google OAuth deep linking with Clerk in Expo Router involves using the useSSO hook, defining a matching redirectUrl scheme, and calling WebBrowser.maybeCompleteAuthSession to finalize the sign-in flow.

Can I use Expo Router protected routes with Clerk?

Yes, you can use Expo Router protected routes with Clerk by implementing Clerk's native useAuth flow. This guards authenticated navigation areas by redirecting unauthenticated users away from restricted screens.

How do I register Expo push notifications for a signed-in Clerk user?

To register Expo push notifications for a signed-in Clerk user, retrieve the Expo push token after authentication and associate it directly with the current Clerk user's profile context.

Why does my Clerk OAuth sign-in fail to complete in my React Native app?

Clerk OAuth sign-in may fail to complete if the redirect URL scheme does not match your app configuration or if WebBrowser.maybeCompleteAuthSession is missing to capture the deep link response.

Do I need EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY to configure ClerkProvider?

Yes, you need to read the EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY environment variable to wire ClerkProvider. This key is required alongside a SecureStore-based token cache to initialize the authentication provider.