What problem does it solve?
Mobile Expo and React Native apps often lose Clerk session state on app restart and require complex setup for OAuth deep linking, protected routes, push notification registration, and organization switching. This Skill provides clear patterns to persist tokens securely, configure OAuth redirects, guard routes with Expo Router, and manage user and organization state so authentication flows behave reliably on mobile devices.
Core Features & Use Cases
- Persist session tokens securely using expo-secure-store so users remain signed in across app restarts.
- Configure OAuth deep linking with a custom app scheme and ensure WebBrowser.maybeCompleteAuthSession is called for proper redirects.
- Protect screens and route groups using Expo Router with useAuth guards to prevent flashes and incorrect redirects.
- Register and store Expo push tokens in user metadata and demonstrate server-side notification sends.
- Example use case: Add Clerk to an Expo app, persist the token cache, enable Google sign-in via deep links, and protect a tab group that only signed-in users can access.
Quick Start
Add Clerk to my Expo app by wrapping the root layout with ClerkProvider that reads EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY from environment and passes the tokenCache from @clerk/expo/token-cache to persist sessions across restarts.