Use Supabase Auth with React Native
Learn how to use Supabase Auth with React Native
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.
Create a React app
Create a React app using the create-expo-app
command.
Install the Supabase client library
Install supabase-js
and the required dependencies.
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.
Create a login component
Let's set up a React Native component to manage logins and sign ups.
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.
Start the app
Start the app, and follow the instructions in the terminal.