Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1 KB

File metadata and controls

43 lines (28 loc) · 1 KB

OAuth-implementation

This project demonstrates how to implement OAuth 2.0 authentication in a Node.js application. OAuth allows users to log in using third-party providers (like Google, GitHub, etc.) without creating a new account for your ap.

🚀 Features

  • OAuth 2.0 authentication
  • Secure login using third-party providers
  • User session management
  • Environment-based configuration
  • Simple and clean folder structure.

🛠 Tech Stack

  • Node.js
  • Express.js
  • Passport.js (strategy-based OAuth library)
  • OAuth 2.0 Provider (e.g., Google, GitHub, etc.)
  • Express-Session
  • Dotenv

⚙️ Setup and Installation

  1. Clone the repository
    git clone https://github.com/yourusername/oauth-implementation.git
    cd oauth-implementation
    npm install
    
    
    PORT=3000

SESSION_SECRET=your_session_secret CLIENT_ID=your_oauth_client_id CLIENT_SECRET=your_oauth_client_secret CALLBACK_URL=http://localhost:3000/auth/provider/callback

npm start http://localhost:3000