Skip to content

Latest commit

 

History

History

auth_social

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Social Authentication Boilerplate

Full-stack OAuth authentication with Google and Facebook using Supabase.

Tech Stack

  • Backend: FastAPI, Supabase, Python-Jose
  • Frontend: React Router, TypeScript, TailwindCSS

Quick Start

Backend

cd backend
python -m venv venv
venv\Scripts\activate  # Linux/Mac: source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload

Frontend

cd frontend
npm install
npm run dev

Environment Variables

Create .env in backend/:

SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
FACEBOOK_APP_ID=your_facebook_app_id
FACEBOOK_APP_SECRET=your_facebook_app_secret
SECRET_KEY=your_jwt_secret
FRONTEND_URL=http://localhost:5173

API Endpoints

Method Endpoint Description
GET /auth/google Initiate Google OAuth
GET /auth/google/callback Google OAuth callback
GET /auth/facebook Initiate Facebook OAuth
GET /auth/facebook/callback Facebook OAuth callback
GET /auth/me Get current user
GET /health Health check