Giter Club home page Giter Club logo

nodejs-authentication's Introduction

Nodejs-Authentication

Authentication system which can be used as a starter code for creating any new application

Overview :-

  • Building this project helps me in understanding the process/work flow behind authentication and autherization of users using the website.

External Libraries:-

  • GoogleCaptcha for integrating captcha during sign in/sign up

NPM Packages :-

  • express for running server and creating routes
  • mongoose ODM for interacting with mongoDB
  • ejs for rendering view/html pages
  • express-ejs-layouts to render partials and layouts
  • Bcrypto for encrypting passwords.
  • request for sending http request from server
  • dotenv to configure .env file(used for storing sensitive information)
  • passport for authentication
  • passport-local-strategy for local authentication
  • passport-google-oauth2-strategy for social authentication
  • nodemailer for sending mail
  • cookie-parser for parsing cookies
  • express-session for encrypting session-cookie made by passport
  • connect-mongo for storing session-cookie in DB to make them persistent
  • node-sass-middleware for generating css from scss/sass
  • connect-flash for setting notification messages in session-cookie
  • generate-passwords for creating random passwords

Features :-

  • Sign up with email
  • Sign in
  • Sign out
  • Reset password after sign in
  • The password stored in the db to be encrypted
  • Google login/signup
  • Forgot password (generate a random password and send on email)
  • Enable re-captcha on both sign up and log in

What I Have Implemented :-

  • Creating server
  • Handling server Requests
  • Managing Routes
  • Creating Actions
  • Database Queries
  • Working of template engines (EJS)
  • Implementing Authentication using Passport
  • Displaying notifications

Folder Structure :-

|__ProjectDir
    |__assets
    |   |__css
    |      |__ layout.css
    |      |__ footer.css
    |      |__ home.css
    |      |__ header.css
    |   |__images
    |      |__ Welcome-to-our-new-website.jpg
    |   |__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
        |__ password_mailer.js
    |__models
    |   |__ user.js
    |__routes
    |   |__ index.js
    |   |__ users.js
    |
    |__views
    |    |__ mailers
    |       |__ new_password.ejs
    |   |__ _footer.ejs
    |   |__ _header.ejs
    |   |__ forgot_password.ejs
    |   |__home.ejs
    |   |__layout.ejs
    |   |__ reset_password.ejs
    |   |__ user_home.ejs
    |   |__ user_profile.ejs
    |__ .gitignore
    |__ index.js
    |__ package-lock.json
    |__ package.json
    |__ ReadMe.md

Run Project :-

  • npm start

nodejs-authentication's People

Contributors

aadarshv9 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.