Skip to content

OisinThomasMorrin/react-auth-with-supabase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This project is the website half of a demonstration of how to use a website to share authentication with a browser extension, and uses supabase and js-cookies.

React + Vite

This is based on the template that provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Supabase Create React App User Management

This example will set you up for a very common situation: users can sign up with a magic link.

This demonstrates how to use:

Technologies used

Build from scratch

1. Create new project

Sign up to Supabase - https://supabase.com/dashboard and create a new project. Wait for your database to start.

2. Get the URL and Key

Go to the Project Settings (the cog icon), open the API tab, and find your API URL and anon key, you'll need these in the next step.

The anon key is your client-side API key. It allows "anonymous access" to your database, until the user has logged in. Once they have logged in, the keys will switch to the user's own login token. This enables row level security for your data. Read more about this below.

image

NOTE: The service_role key has full access to your data, bypassing any security policies. These keys have to be kept secret and are meant to be used in server environments and never on a client or browser.

3. Env vars

Create a file in this folder .env

VITE_SUPABASE_URL=
VITE_SUPABASE_ANON_KEY=

Populate this file with your URL and Key.

4. Run the application

Install the dependencies: pnpm i

Run the application: pnpm run start. Open your browser to http://localhost:5173/ and you are ready to go 🚀.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published