This project is an application that implements OAuth2 SSO authentication for Google and Kakao using a SvelteKit frontend and FastAPI backend.
src/
- SvelteKit frontend codebackend/
- FastAPI backend codepnpm install
pnpm run dev
The frontend runs at http://localhost:5173 by default.
cd backend
pip install -r requirements.txt
Copy the .env.example
file to create a .env
file and configure the necessary environment variables:
cp .env.example .env
python run.py
The backend runs at http://localhost:3000 by default.
This project uses Supabase as its database. The following table is required:
CREATE TABLE users (
id BIGSERIAL PRIMARY KEY,
uuid UUID NOT NULL UNIQUE,
display_name TEXT,
email TEXT NOT NULL UNIQUE,
phone TEXT,
provider TEXT NOT NULL,
provider_type TEXT NOT NULL DEFAULT 'social',
user_status BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP WITHOUT TIME ZONE,
last_sign_in_at TIMESTAMP WITHOUT TIME ZONE
);
http://localhost:3000/api/auth/callback/google
as an authorized redirect URI..env
file.http://localhost:5173
as a site domain in Platform > Web.http://localhost:3000/api/auth/callback/kakao
as a redirect URI..env
file.