clerk-expo-patterns

Implement Clerk authentication patterns for Expo and React Native with SecureStore token caching.

18|Updated Jul 23, 2025
One-click install
npx skills add https://github.com/faw01/create-mf2-app --skill clerk-expo-patterns-faw01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clerk-expo-patterns
Source: https://github.com/faw01/create-mf2-app/tree/main/apps/cli/template/.agents/skills/clerk-expo-patterns
Command: npx skills add https://github.com/faw01/create-mf2-app --skill clerk-expo-patterns-faw01

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @clerk/expo, expo-secure-store, expo-router, expo-web-browser, and includes references (resource) components.

What problem does it solve?

This skill addresses the complexity of implementing secure, persistent authentication in React Native and Expo environments, preventing common pitfalls like token loss and incorrect environment variable usage.

Core Features & Use Cases

  • Secure Token Persistence: Implements SecureStore caching to ensure user sessions survive app restarts.
  • OAuth Integration: Provides patterns for Google, Apple, and GitHub sign-in flows using deep linking.
  • Route Protection: Offers standardized guards for Expo Router to secure sensitive screens and layouts.
  • Use Case: Use this skill to quickly scaffold a production-ready authentication layer for a new mobile app, ensuring users remain logged in and protected routes are correctly enforced.

Quick Start

Use the clerk-expo-patterns skill to configure the ClerkProvider with SecureStore token caching in my root layout file.

Frequently Asked Questions about clerk-expo-patterns

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

FAQPage Schema
How do I persist Clerk authentication tokens securely in an Expo React Native app?

To persist Clerk authentication tokens securely in Expo, configure ClerkProvider with expo-secure-store token caching to ensure user sessions survive app restarts without exposing credentials.

How do I set up OAuth deep linking for Google and Apple sign-in with Clerk in Expo?

Setting up OAuth deep linking for Clerk in Expo uses expo-web-browser to handle external sign-in flows for Google, Apple, and GitHub, redirecting users back to the application upon completion.

What is the best way to protect sensitive screens using Expo Router and Clerk?

The best way to protect sensitive screens using Expo Router and Clerk is implementing standardized route guards that secure layouts and prevent unauthorized access to restricted mobile screens.

Does Clerk work with Expo Router for production-grade session management?

Yes, Clerk works with Expo Router to provide production-grade session management by combining secure credential handling, persistent SecureStore caching, and route-level access control for mobile environments.

Why do users lose their Clerk session after restarting my React Native app?

Users lose their Clerk session after restarting a React Native app when SecureStore caching is not configured, causing tokens to disappear from memory instead of being persisted locally.