Signup And Login - NodeJS And MongoDBSignup And Login - NodeJS And MongoDB
Node.js script for user authentication: securely sign up and log in with ease.Signup And Login - NodeJS And MongoDB
Node.js script for user authentication: securely sign up and log in with ease.Overview
This Node.js script uses Express.js and Mongoose to provide a secure and efficient way to manage user authentication. Built using the MVC architecture, it separates concerns into models, views, and controllers for easy maintenance and scalability. Passwords are securely hashed before being stored in the database, ensuring maximum security for user data. The script also includes Bootstrap and PugJS for easy and attractive front-end design. With all these features, this script is a comprehensive solution for user authentication.
Features
MVC Architecture
Pages: Signup - Login - Email Verification - Forgot Password - Password Rest
Form Validation
Email Verification
Password Hashing
Password Rest
User Authentication
User Session
Logout
Delete Account
Requirements
Node.js (the version that was used is v18.16.0)
MongoDB (the version that was used is v6.0.6)
Instructions
install MongoDB and node.js: https://www.youtube.com/watch?...
you can see the video under the preview image at the top of the page that show the following steps to setting the app
add the email and password in controllers/sendEmailVerif.js
change the secret string in app.js and models/dbConnect.js
1. run the " npm install " command
2. run the" mongod --ipv6" command from the path where you install MongoDB
3. run " node app.js " or " nodemon app " (if you install nodemon)
Other items by this author
Category | Scripts & Code / NodeJS |
First release | 3 July 2023 |
Last update | 27 December 2023 |
Files included | .css, Javascript .js |
JavaScript Framework | Node.js |
Tags | bootstrap, login, signup, mvc, mongodb, user authentication, form validation, email verification, node.js, password hashing, express.js, mongoose, pugjs, express session |