This is a simple demo project showing how to implement Google OAuth login using a React frontend and a Flask backend.
- Sign in with Google account
- Display logged-in user name
- Session management with Flask
- Logout functionality
- Simple responsive login page
- Python 3.x
- Node.js / npm
- Google OAuth credentials
- pip install -r requirements.txt
- create .env file in backend folder with Google OAuth credentials:
FLASK_SECRET_KEY=your_secret_key
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret - run the Flask server:
python oauth/api.py
- navigate to the project folder
- npm install
- npm start
Disclaimer: This project is just a simple API demo for local development. In a real project, tokens should be stored securely (e.g., using Keytar), and HTTPS should be used instead of HTTP.

