Use Supabase Auth with React Native
Learn how to use Supabase Auth with React Native
1
Create a new Supabase project
Launch a new project in the Supabase Dashboard.
Your new database has a table for storing your users. You can see that this table is currently empty by running some SQL in the SQL Editor.
2
Create a React app
Create a React app using the create-expo-app
command.
3
Install the Supabase client library
Install supabase-js
and the required dependencies.
4
Set up your login component
Create a helper file lib/supabase.ts
that exports a Supabase client using your Project URL and public API (anon) key.
5
Create a login component
Let's set up a React Native component to manage logins and sign ups.
6
Add the Auth component to your app
Add the Auth
component to your App.tsx
file. If the user is logged in, print the user id to the screen.
7
Start the app
Start the app, and follow the instructions in the terminal.