Cookie-Based-MultiAuth-React is a versatile authentication system built with React.js that facilitates secure, cookie-based login for multiple user roles, specifically agents and customers. This repository showcases an intuitive user interface that handles authentication processes while ensuring protection and privacy through secure cookie management.
- Dual Login System: Supports both agent and customer logins with role-based access control.
- Cookie Management: Utilizes cookies for session management to maintain user authentication across multiple sessions.
- Protected Routes: Implements route protection to ensure that only authenticated users can access specific pages based on their role.
- Responsive Design: Built with a focus on user experience across various devices.
- Easy Integration: Modular design makes it easy to integrate with existing applications.
- React.js: JavaScript library for building user interfaces.
- React Router: For navigation and routing.
- Cookie.js: For cookie management and session handling.
- CSS: For styling the application.
- Node.js (version 14 or above)
- npm (Node package manager)
- Clone the repository:
git clone https://github.com/yourusername/Cookie-Based-MultiAuth-React.git
- Navigate to the project directory:
cd Cookie-Based-MultiAuth-React
- Install the dependencies:
npm start
To start the application in development mode, run: npm start
This will start the development server, and you can view the application in your browser at http://localhost:3000.
Usage Agent Login: Navigate to the agent login page and enter your credentials. Customer Login: Navigate to the customer login page and enter your credentials. Protected Routes: Attempt to access protected routes without logging in to see the authentication in action. Contributing Contributions are welcome! If you have suggestions or improvements, feel free to fork the repository and create a pull request.
- Replace
SurajTaradale
with your actual GitHub username in the clone URL. - Update the contact email address with your own.
- Customize any sections as needed based on your specific project details or additional features.
- Save this content in a file named
README.md
in your Cookie-Based-MultiAuth-React repository.
This README will provide a clear and professional overview of your project!