Giter Site home page Giter Site logo

mossaabfrifita / angular-16-jwt-authentication-authorization Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 229 KB

Angular 16 JWT Authentication Example - Demonstrating Token-Based Authentication and Role-Based Authorization with HttpOnly Cookies. Includes Automatic Token Expiration Handling and Refresh Token Mechanism

TypeScript 72.80% HTML 26.74% SCSS 0.46%
access-token angular angular16 auth authentication authorization guards http-interceptor httponly-cookie jwt

angular-16-jwt-authentication-authorization's Introduction

Angular 16 JWT Authentication and Role-Based Authorization

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.

Features

✅ 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.

Getting Started

Prerequisites

  • Node.js and npm
  • Angular CLI

Installation

  1. Clone the repository.
  2. Navigate to the project folder.
  3. Run npm install to install the dependencies.
  4. Configure the project as per your requirements.

Usage

  1. Run the application using ng serve.
  2. Explore the authentication and authorization features.
  3. Customize the project as needed.

Backend API

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.

angular-16-jwt-authentication-authorization's People

Contributors

mossaabfrifita avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.