Skip to main content

Posts

Showing posts with the label Angular 11

Part-1 Angular JWT(JSON Web Token) Authentication(Access Token Implementation)

In this article, we are going to understand the steps on JWT authentication implementation in Angular(Version11 used in this sample) application. Here our main focus is on authenticate users using the JWT access token. What Is JSON Web Token?: JSON Web Token is a digitally signed and secured token for user validation. The jwt is constructed with 3 informative parts: Header Payload Signature Create A Sample Angular Application: Let's begin by creating a sample application in which we are going to implement JWT authentication. Command To Install Angular CLI: npm install -g @angular/cli Command To Create Angular App: ng new your_app_name Command To Install Angular Material: ng add @angular/material Angular JWT Library: JWT library to decrypt the user info within the JWT access token. Command To Run Angular JWT Library: npm install @auth0/angular-jwt Integrate Login Module: Let's create all login files like the below structure. src/app/login/login-route.module.ts: impo