Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.
/ clerk-expo-starter Public archive

Expo starter project using Clerk for authentication

Notifications You must be signed in to change notification settings

clerk/clerk-expo-starter

Repository files navigation


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.

chat on Discord documentation twitter


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

Getting Started

Prerequisites

  • React v16+
  • Node.js v14+

Setup

To run the example locally you need to:

  1. Sign up at Clerk.dev.
  2. Go to your Clerk dashboard and create an application.
  3. Set your publishableKey in App.tsx or if you are using a legacy key frontendApi
  4. npm i to install the required dependencies.
  5. 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

  1. In Contact information section enable Email Address and pick Email verification code method in the modal.
  2. In Authentication factors section enable Password and Email verification code.
  3. In Personal information, enable Name to use first and last names during sign up
  4. In Social Login, enable Google Oauth provider.

For production instances

  1. Follow all the steps above
  2. Whitelist your custom redirect URL via Clerk Dashboard for maximum security during native OAuth flows. This is an image

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: