This is a node project which consists of Authentication modules like passport.js, social authentication(google oauth).
-assets
--css
---footer.css
---header.css
---home.css
---layout.css
---resetPassword.css
---user_profile.css
---user_sign_in.css
--images
--js
---sign-in.js
-config
--middleware.js
--mongoose.js
--nodemailer.js
--passport-google-oauth2-strategy.js
--passport-local-strategy.js
-controllers
--home_controller.js
--users_controller.js
-mailers
--login_mailers.js
--reset_mailer.js
-models
--user.js
-routes
--index.js
--users.js
-views
--_footer.ejs
--_header.ejs
--forgot_password.ejs
--home.ejs
--layout.ejs
--sendMail.ejs
--user_profile.ejs
--user_sign_in.ejs
--user_sign_up.ejs
-index.js
-package.lock.json
-package.json
-README
-
Clone this project
-
Start by installing npm and mongoDB if you don't have them already.
-
Run the Mongo Server.
-
Create a google login credentials and subsequently a google Oauth ID. Refer this : https://console.developers.google.com/
-
Create a dummy email id which can be used by mailer.
-
Navigate to Project Directory by :
cd Authosys
-
Run command:
npm install
npm start or node index.js
-
Go to (.env):
CLIENT_ID= Enter your Client Id
CLIENT_SECRET= Enter Client_secret
EMAIL= Enter your Gmail Id
PASSWORD= Enter your Gmail Password
Feel free to use and contribute! :)