clerk-expo-starter
clerk-expo-starter copied to clipboard
Expo starter project using Clerk for authentication
Clerk Expo Starter
If you want to use the new file-system based router that was introduced with Expo Router V2, you can check out this branch
This starter project shows how to use Clerk with Expo to authenticate users in your React Native application. When users sign up or sign in, Clerk handles the state of the authentication and switches between public or protected routes.
Clerk is Hiring!
Would you like to work on Open Source software and help maintain this repository? Apply today!
Demo
Sign up using One-time passcodes (OTP) & Sign in using OAuth
![](https://github.com/clerk/clerk-expo-starter/raw/main/docs/sign-up-otp-demo.gif)
![](https://github.com/clerk/clerk-expo-starter/raw/main/docs/sign-in-oauth-demo.gif)
Getting Started
Prerequisites
- React v16+
- Node.js v14+
Setup
To run the example locally you need to:
- Sign up at Clerk.dev.
- Go to your Clerk dashboard and create an application.
- Set your publishableKey in
App.tsx
or if you are using a legacy key frontendApi -
npm i
to install the required dependencies. -
npm run start
to launch the Expo development server.
Sign up & Sign in configuration
For the sign up flow to work as demonstrated, you need to log into your Clerk Dashboard and make sure the following settings have been configured in User & Authentication and Social login sections:
For development instances
- In Contact information section enable Email Address and pick Email verification code method in the modal.
- In Authentication factors section enable Password and Email verification code.
- In Personal information, enable Name to use first and last names during sign up
- In Social Login, enable Google Oauth provider.
For production instances
- Follow all the steps above
- Whitelist your custom redirect URL via Clerk Dashboard for maximum security during native OAuth flows.
Learn more
To learn more about Clerk and Expo, take a look at our official documentation.
Support
You can get in touch with us in any of the following ways:
- Join our official community Discord server
- Open a GitHub support issue
- Contact options listed on our Support page