This project demonstrates JWT (JSON Web Tokens) authentication and role-based authorization with Angular 16. It includes features such as secure storage of tokens in HttpOnly cookies, token management (access_token and refresh_token), auto-login, auto-logout, and role-based access control for enhanced security.
- This project is built with Angular 16 and showcases best practices for authentication and authorization.
- Token-based authentication is a fundamental security concept in modern web applications.
✅ Secure storage of tokens in HttpOnly cookies.
✅ Token management for access and refresh tokens.
✅ Implementation of auto-login and auto-logout for a seamless user experience.
✅ Role-based access control for increased security.
- Node.js and npm
- Angular CLI
- Clone the repository.
- Navigate to the project folder.
- Run
npm install
to install the dependencies. - Configure the project as per your requirements.
- Run the application using
ng serve
. - Explore the authentication and authorization features.
- Customize the project as needed.
For this Angular application to function correctly, you need a backend API that handles authentication and provides the necessary data. You can find the source code for the backend API on the corresponding GitHub repository. Make sure you also have the backend API up and running to fully test the authentication and authorization features of this Angular application.