https://github.com/clerk/clerk-expo-starter
Expo starter project using Clerk for authentication
https://github.com/clerk/clerk-expo-starter
auth clerk expo react-native
Last synced: 7 months ago
JSON representation
Expo starter project using Clerk for authentication
- Host: GitHub
- URL: https://github.com/clerk/clerk-expo-starter
- Owner: clerk
- Created: 2021-11-29T09:15:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-19T20:03:18.000Z (over 1 year ago)
- Last Synced: 2024-04-19T21:24:42.205Z (over 1 year ago)
- Topics: auth, clerk, expo, react-native
- Language: TypeScript
- Homepage:
- Size: 2.4 MB
- Stars: 80
- Watchers: 1
- Forks: 17
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Clerk Expo Starter
> If you want to use the new file-system based router that was introduced with [Expo Router V2](https://blog.expo.dev/introducing-expo-router-v2-3850fd5c3ca1), you can check out [this branch](https://github.com/clerkinc/clerk-expo-starter/tree/router-v2)
This starter project shows how to use [Clerk](https://www.clerk.dev/?utm_source=github&utm_medium=starter_repos&utm_campaign=expo_starter) with [Expo](https://expo.dev/) to authenticate users in your [React Native](https://reactnative.dev/) application. When users sign up or sign in, Clerk handles the state of the authentication and switches between public or [protected routes](https://reactnavigation.org/docs/auth-flow).
[](https://discord.com/invite/b5rXHjAg7A)
[](https://docs.clerk.dev)
[](https://twitter.com/intent/follow?screen_name=ClerkDev)---
**Clerk is Hiring!**
Would you like to work on Open Source software and help maintain this repository? [Apply today!](https://apply.workable.com/clerk-dev/)
---
## 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](https://www.clerk.dev/?utm_source=github&utm_medium=starter_repos&utm_campaign=expo_starter).
2. Go to your [Clerk dashboard](https://dashboard.clerk.dev/?utm_source=github&utm_medium=starter_repos&utm_campaign=expo_starter) 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](https://dashboard.clerk.dev/?utm_source=github&utm_medium=starter_repos&utm_campaign=expo_starter) 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](https://dashboard.clerk.dev/last-active?path=/user-authentication/social-login) for maximum security during native OAuth flows.
## Learn more
To learn more about Clerk and Expo, take a look at our
[official documentation](https://reference.clerk.dev/reference/clerk-expo?utm_source=github&utm_medium=starter_repos&utm_campaign=expo_starter).## Support
You can get in touch with us in any of the following ways:
- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)
- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)
- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_expo_starter)