This repository contains a simple authentication system APT that can be used in any web application. The system supports user registration, login, and password reset. It also encrypts all passwords using a secure hashing algorithm.
Technologies and tools used in the project:
- Node.js
- express
- MongoDB
- mongoose
- bcryptjs
- dotenv
- express-async-handler
- express-validator
- jsonwebtoken
- morgan
- nodemailer
- slugify
Here're some of the project's best features:
-
User registration: Users can register in our application using their email and password. It's important that the email is a valid email address, and the password contains at least 6 characters, numbers, or a combination of both.
-
User login: Users can log in to our application using their email and password. It's important that the email and password are present in our database and belong to the respective user.
-
Forgot password: When a user forgets their password, the application allows them to reset it by entering their email address. The application verifies that the email address is correct and is present in the database. It then generates a code and sends it to the user's email address. The code is valid for 10 minutes. When the user enters the code, the application hashes it and compares it to the hashed code stored in the database. If the codes match and the code has not expired, the user is allowed to reset their password.
1. node.js
npm init
2. express
npm install express
3. mongoose
npm install mongoose
4. bcryptjs
npm install bcryptjs
5. jsonwebtoken
npm install jsonwebtoken
6. express-validator
npm install express-validator
7. express-async-handler
npm install express-async-handler
8. morgan
npm install morgan
9. nodemailer
npm install nodemailer
10. dotenv
npm install dotenv
11. mrgan
npm install morgan
12. slugify
npm install slugify
If you are interested in contributing to the Authentication System, please feel free to submit a pull request. We welcome all contributions!
If you have any questions or feedback, please feel free to contact us at [poularefaat86@gmail.com].