{"repo":"Mounir-abaddah/passport-google-oauth2","free":true,"listed":false,"github":"https://github.com/Mounir-abaddah/passport-google-oauth2","clone":"git clone https://github.com/Mounir-abaddah/passport-google-oauth2.git","description":"GB : 🔐 A Node.js + Express authentication system using Google OAuth 2.0 with Passport.js and MongoDB. Includes JWT-based session handling, secure cookies, and a ready-to-use Google login integration. FR: 🔐 Un système d’authentification Node.js + Express utilisant Google OAuth 2.0 avec Passport.js et MongoDB. Comprend la gestion des sessions ...","language":"JavaScript","stars":13,"topics":["google","passport","passport-google-oauth20","mern-stack"],"license":null,"category":"auth-billing-email","readme_excerpt":"🚀 Google Authentication with Passport.js, Express & MongoDB 👉 If you find this project useful, don’t forget to give it a ⭐️ on GitHub! 👉 Si tu trouves ce projet intéressant, n’hésite pas à lui mettre une ⭐️ sur GitHub ! --- 🇬🇧 English This project implements Google OAuth 2.0 authentication using Passport.js in a Node.js + Express application, with MongoDB for user storage. --- 📦 Installation 1. Clone the project 2. Install dependencies 3. Setup environment variables Create a .env file in the project root: 4. Run the server Server will run at: --- 🔑 Authentication Routes - Start Google authentication - Google callback (after login) - On success: - A JWT token is generated - Token is stored in a secure token cookie - User is redirected to FRONTEND URL/Dashboard --- ⚙️ Google OAuth Setup (Console) 1. Go to Google Cloud Console. 2. Create a new project (or select an existing one). 3. Navigate to APIs & Services Credentials . 4. Click Create Credentials OAuth Client ID . 5. Choose Web application as application type. 6. In Authorized redirect URIs , add: 7. Copy the Client ID and Client Secret into your .env file: --- 🇫🇷 Français Ce projet met en place une authentification Google OAuth 2.0 avec Passport.js dans une application Node.js + Express , en utilisant MongoDB pour stocker les utilisateurs. --- 📦 Installation 1. Cloner le projet 2. Installer les dépendances 3. Configurer les variables d'environnement Créez un fichier .env à la racine du projet : 4. Lancer le serve","default_branch":null,"files":null,"tree":[],"storefront":"/r/Mounir-abaddah","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Mounir-abaddah/passport-google-oauth2/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}