Skip to content

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

Notifications You must be signed in to change notification settings

purewebstar/nodejs-verify-user-email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published