Svelte + Supabase Auth App
This is a simple authentication app using Svelte and Supabase with Supabase JS for managing user sign-in, sign-up, and session handling.
Features
- User sign-up, login
- Protected routes
- Supabase session handling
Getting Started
Prerequisites
Installation
- Clone the repository:
git clone https://github.com/gavesh-uhh/svelte-supabase-auth.git
cd svelte-supabase-auth
- Install the dependencies:
npm install
- Create a
.env.local
file in the root directory and add your Supabase credentials:
PUBLIC_SUPABASE_URL=https://your-supabase-url.supabase.co
PUBLIC_SUPABASE_ANON_KEY=your-anon-key
- Run the app:
npm run dev
- Open the app in your browser at
http://localhost:5173
.
Usage
- Sign Up: Create an account using your email and password.
- Login: Log in with your email and password.
- Protected Route: Access protected pages after logging in.
Supabase Setup
- Go to your Supabase project dashboard.
- Enable Auth and configure email/password sign-in.
- Use the Supabase URL and anon key provided in the project settings.
License
This project is open-source and available under the MIT License.