This is a simple MERN stack application that demonstrates user registration and login functionality with bcrypt for password hashing.
- MongoDB: NoSQL database for storing user information.
- Express.js: Web application framework for Node.js, used for server-side logic.
- React.js: JavaScript library for building user interfaces.
- Node.js: JavaScript runtime environment for running server-side code.
- bcrypt: Library for hashing passwords securely.
- User Registration: Allows users to create a new account with a unique username and securely hashed password using bcrypt.
- User Login: Allows registered users to login with their username and password, with bcrypt used to verify the password.
- Protected Routes: Certain routes are protected and require authentication. Users must be logged in to access these routes.
- Register a New User:
- Navigate to the registration page and enter a unique username and password.
- The password is hashed securely using bcrypt before being stored in the database.
- Login:
- After registering, users can log in with their username and password.
- The password entered during login is hashed and compared with the hashed password stored in the database using bcrypt for authentication.
- Used proxy in package.json to overpass the CORS policy.
- Access Protected Routes:
- Certain routes, such as user profile or dashboard, may require authentication.
- Users must be logged in to access these routes, otherwise, they will be redirected to the login page.
Contributions are welcome! If you have any ideas, improvements, or issues, feel free to open a pull request or raise an issue.
#ScreenShots LOGIN PAGE
REGISTRATION PAGE