ravishankarsingh13 / Authosys

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Authentication Task

This is a node project which consists of Authentication modules like passport.js, social authentication(google oauth).

Project Structure:--

-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

How to setup project

  1. Clone this project

  2. Start by installing npm and mongoDB if you don't have them already.

  3. Run the Mongo Server.

  4. Create a google login credentials and subsequently a google Oauth ID. Refer this : https://console.developers.google.com/

  5. Create a dummy email id which can be used by mailer.

  6. Navigate to Project Directory by :

    cd Authosys

  7. Run command:

    npm install

    npm start or node index.js

  8. 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! :)

About


Languages

Language:JavaScript 63.0%Language:HTML 24.6%Language:CSS 12.4%