purewebstar / nodejs-verify-user-email

A demo for user account email verification for registering new account and saving it into MongoDb with jsonwebtoken authentication. (MVC architecture and Restful API)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Verifying User Account by email ✔️

simple user account registering and login with user email verification using nodemailer Nodejs App (MVC) and MongoDb

Prerequisite:

  • npm/node latest version (node.js)

Technologies used:

1. Backend

  • Nodejs
  • ExpressJs
  • MongoDb

2. Frontend

  • Jquery
  • Mdbootstrap
  • Bootstrap

Dependency install ❗

npm install --save

Dependencies are:

express, bcrypt, cors, jsonwebtoken, mongoose, cookie-parser, bootstrap, mdbootstrap, jquery, helmet, dotenv, nodemailer

Dev Dependency install

npm install --save-dev

Dev Dependency is:

nodemon

Add .env file then write down below ❗

SECRET_KEY=?
SECRET_ACCESS=?
SECRET_REFRESH=?
DATABASE_URI=?
PORT=?
// For gmail SMTP authentication (Your gmail email and password)
SECRET_USER=?
SECRET_PASSWORD=?

To generate tokens using CRYPTO write and run in your terminal:

node
require('crypto').randomBytes(64).toString('hex')

Run Project

npm run devStart

Or

nodemon app.js

About

A demo for user account email verification for registering new account and saving it into MongoDb with jsonwebtoken authentication. (MVC architecture and Restful API)


Languages

Language:EJS 51.6%Language:JavaScript 48.4%