This project is a secure authentication and authorization system built with Angular, NestJS, and MySQL. This project's main folder contains two separate projects, one is a secure version and the other is a vulnerable version. This project aims to provide a robust and scalable solution for managing user authentication and password reset functionalities in a secured manner, and showcase vulnerabilities and how to take care of them.
- User registration and login
- Password reset functionality
- JWT-based authentication
- Secure password storage with bcrypt
- Vulnerable version of the system to attacks like XSS and SQL injection.
- Angular
- NestJS
- MySQL
- Node.js (version 21.7.1)
- MySQL
-
Clone the repository:
git clone https://github.com/SagiDahari/Authentication-System.git cd Authentication-System -
Backend setup: (the same applies for the vulnerable version in the folder "project-vulnerable")
cd project-secured/nest-auth npm install -
Frontend setup:
cd ../angular-auth npm install
To start the NestJS backend:
cd nest-auth
npm run start:devIn the nest-auth/src/app.module.ts file, change your username and password to your username and password, in order for the DB to run.
To start the Angular frontend:
../angular-auth
ng serve- Frontend: http://localhost:4200
- Backend: http://localhost:8000
Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.