https://github.com/jyotideepjee1803/oauth_sign
https://github.com/jyotideepjee1803/oauth_sign
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jyotideepjee1803/oauth_sign
- Owner: jyotideepjee1803
- Created: 2023-12-28T05:44:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-28T18:37:41.000Z (over 1 year ago)
- Last Synced: 2025-01-07T02:06:17.929Z (5 months ago)
- Language: EJS
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node.js OAuth Sign-In Using Passport
## Overview
This repository provides a simple Node.js application that demonstrates OAuth sign-in using Passport with Google as the authentication provider. OAuth allows users to sign in to your application using their Google credentials, providing a seamless and secure authentication experience.
## Prerequisites
Before getting started, ensure that you have the following installed:
- Node.js
- npm (Node Package Manager)## Installation
1. Clone the repository:
```bash
git clone https://github.com/your-username/nodejs-oauth-signin.git
2. Navigate to the project directory:
```bash
cd nodejs-oauth-signin3. Install dependencies:
```bash
npm install
## Configuration
1. Create a project in the [Google Cloud Console](https://console.cloud.google.com/).
2. Enable the "Google+ API" for your project.
3. Create credentials for a new OAuth 2.0 client ID.
4. Configure the .env file with your Google OAuth credentials:```env
PORT = Port number
clientID = your-google-client-id
clientSecret = your-google-client-secret
MONGODB_URI = your database URL
cookieKey = your string to be used as key in cookies
```## USAGE
Start the application
```bash
node index.js
```## CONTRIBUTIONS
Contributions are welcome! Feel free to submit pull requests or to open issues