1212
GitHub - mmraja83/google-auth-website: A professional, production-ready boilerplate for a web application featuring Google SSO and Email/Password Authentication. Built with React (Vite) and Python (FastAPI), designed with a "Soft Minimalism" aesthetic. · GitHub
Skip to content

mmraja83/google-auth-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google SSO Auth Boilerplate

A professional, production-ready boilerplate for a web application featuring Google SSO and Email/Password Authentication. Built with React (Vite) and Python (FastAPI), designed with a "Soft Minimalism" aesthetic.

App Demo

Tags: google-sso, authentication, fastapi, react, jwt, boilerplate, python, sqlite, soft-minimalism, glassmorphism, email-verification

Features

  • Authentication: JWT-based secure Access Tokens.
  • Google SSO: Native integration with Google Identity Services.
  • User Dashboard: Protected routes with a sidebar layout.
  • Profile Management: Update name, phone, and address.
  • Modern UI: Glassmorphism, soft animations, and responsive design.

Login Page

Prerequisites

  • Python 3.9+
  • Node.js 16+
  • SQLite (Built-in)

Project Structure

google-auth-website/
├── backend/            # FastAPI Python Backend
└── frontend/           # React Vite Frontend

Setup Instructions

1. Backend Setup

Navigate to the backend directory:

cd backend

Create a virtual environment:

python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

Install dependencies:

pip install "bcrypt<4.0.0" fastapi uvicorn sqlalchemy pydantic python-multipart python-jose requests google-auth google-auth-oauthlib email-validator python-dotenv

Configuration (.env): Create a .env file in the backend/ directory:

GOOGLE_CLIENT_ID=your_google_client_id_here
SECRET_KEY=your_secure_random_string_here

Run the server:

uvicorn main:app --reload

Backend will run at: http://localhost:8000.

2. Frontend Setup

Navigate to the frontend directory:

cd frontend

Install dependencies:

npm install

Configuration (.env): Create a .env file in the frontend/ directory:

VITE_GOOGLE_CLIENT_ID=your_google_client_id_here

Run the development server:

npm run dev

Frontend will run at: http://localhost:5173.

Google Cloud Setup

  1. Go to Google Cloud Console.
  2. Create a new Project.
  3. Navigate to APIs & Services > OAuth consent screen. Configure as "External".
  4. Navigate to Credentials > Create Credentials > OAuth Client ID.
    • Application Type: Web application.
    • Authorized JavaScript origins: http://localhost:5173.
  5. Copy the Client ID and paste it into both .env files.

Troubleshooting

  • 500 Error on Register: Ensure bcrypt version is compatible (<4.0.0).
  • Google Login Error: Verify Authorized JavaScript origins matches your frontend URL exactly.
  • Import Error: Check relative paths in your React components.

License

MIT

About

A professional, production-ready boilerplate for a web application featuring Google SSO and Email/Password Authentication. Built with React (Vite) and Python (FastAPI), designed with a "Soft Minimalism" aesthetic.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors