This repo consist of implementation of Oauth along with JWT. The Oauth implementation consists of two widely used Oauth provides including google and facebook.
- Passport
- JWT
- Passport-jwt
- Passport-google-oauth20
- passport-facebook
To install this project
-
Clone the repository from GitHub:
git clone https://github.com/Senor101/Node-OAuth.git
-
Navigate to the project directory:
cd Node-OAuth
-
Install the required dependencies:
npm install
-
Configure the environment variables:
- Create a
.env
file in the project root directory. Include the credentials provided in.env.example
file.
- Run the application:
npm start
- Access the application in your browser at
http://localhost:3000/
For using google oauth, access the google auth route as
http://localhost:3000/auth/google
For using facebook oauth, access the facebook auth route as
http://localhost:3000/auth/facebook