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.
- OAuth 2.0 authentication
- Secure login using third-party providers
- User session management
- Environment-based configuration
- Simple and clean folder structure.
- Node.js
- Express.js
- Passport.js (strategy-based OAuth library)
- OAuth 2.0 Provider (e.g., Google, GitHub, etc.)
- Express-Session
- Dotenv
- 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