Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bezkoder/angular-15-jwt-auth

Angular 15 JWT Authentication & Authorization with Web API and HttpOnly Cookie - Token Based Auth, Router, Forms, HttpClient, BootstrapBootstrap
https://github.com/bezkoder/angular-15-jwt-auth

angular angular-15 angular15 authentication authorization bootstrap bootstrap-4 bootstrap4 httponly-cookie json-web-token jwt jwt-auth jwt-authentication jwt-authorization jwt-token jwt-tokens login registration token-authorization token-based-authentication

Last synced: about 1 month ago
JSON representation

Angular 15 JWT Authentication & Authorization with Web API and HttpOnly Cookie - Token Based Auth, Router, Forms, HttpClient, BootstrapBootstrap

Awesome Lists containing this project

README

        

# Angular 15 JWT Authentication & Authorization example with Rest API

Build Angular 15 JWT Authentication & Authorization example with Rest Api, HttpOnly Cookie and JWT (including HttpInterceptor, Router & Form Validation).
- JWT Authentication Flow for User Registration (Signup) & User Login
- Project Structure with HttpInterceptor, Router
- Way to implement HttpInterceptor
- How to store JWT token in HttpOnly Cookie
- Creating Login, Signup Components with Form Validation
- Angular Components for accessing protected Resources
- How to add a dynamic Navigation Bar to Angular App
- Working with Browser Session Storage

## Flow for User Registration and User Login
For JWT – Token based Authentication with Rest API, we’re gonna call 2 endpoints:
- POST `api/auth/signup` for User Registration
- POST `api/auth/signin` for User Login
- POST `api/auth/signout` for User Logout

You can take a look at following flow to have an overview of Requests and Responses that Angular 15 JWT Authentication & Authorization Client will make or receive.

![angular-15-jwt-authentication-authorization-flow](angular-15-jwt-authentication-authorization-flow.png)

## Angular JWT App Diagram with Router and HttpInterceptor
![angular-15-jwt-authentication](angular-15-jwt-authentication.png)

For more detail, please visit the tutorial:
> [Angular 15 JWT Authentication & Authorization with Web API example](https://www.bezkoder.com/angular-15-jwt-auth/)

> [Angular Logout when Token is expired](https://www.bezkoder.com/logout-when-token-expired-angular-15/)

> [Angular Refresh Token with Interceptor and JWT example](https://www.bezkoder.com/angular-15-refresh-token/)

## With Spring Boot back-end

> [Angular 15 + Spring Boot: JWT Authentication and Authorization example](https://www.bezkoder.com/angular-15-spring-boot-jwt-auth/)

## With Node.js Express back-end

> [Angular 15 + Node.js Express: JWT Authentication and Authorization example](https://www.bezkoder.com/node-js-angular-15-jwt-auth/)

Run `ng serve --port 8081` for a dev server. Navigate to `http://localhost:8081/`.

## More practice
> [Angular 15 CRUD example with Rest API](https://www.bezkoder.com/angular-15-crud-example/)

> [Angular 15 Pagination example](https://www.bezkoder.com/angular-15-pagination-ngx/)

> [Angular 15 File upload example with Progress bar](https://www.bezkoder.com/angular-15-file-upload/)

> [Angular 15 Form Validation example](https://www.bezkoder.com/angular-15-form-validation/)

Fullstack with Node:
> [Angular 15 + Node Express + MySQL example](https://www.bezkoder.com/angular-15-node-js-express-mysql/)

> [Angular 15 + Node Express + PostgreSQL example](https://www.bezkoder.com/angular-15-node-js-express-postgresql/)

> [Angular 15 + Node Express + MongoDB example](https://www.bezkoder.com/angular-15-node-js-express-mongodb/)

> [Angular 15 + Node Express: File upload example](https://www.bezkoder.com/angular-15-node-express-file-upload/)

> [Angular 15 + Node.js Express: JWT Authentication and Authorization example](https://www.bezkoder.com/node-js-angular-15-jwt-auth/)

Fullstack with Spring Boot:
> [Angular 15 + Spring Boot example](https://www.bezkoder.com/spring-boot-angular-15-crud/)

> [Angular 15 + Spring Boot + MySQL example](https://www.bezkoder.com/spring-boot-angular-15-mysql/)

> [Angular 15 + Spring Boot + PostgreSQL example](https://www.bezkoder.com/spring-boot-angular-15-postgresql/)

> [Angular 15 + Spring Boot + MongoDB example](https://www.bezkoder.com/spring-boot-angular-15-mongodb/)

> [Angular 15 + Spring Boot: File upload example](https://www.bezkoder.com/angular-15-spring-boot-file-upload/)

> [Angular 15 + Spring Boot: JWT Authentication and Authorization example](https://www.bezkoder.com/angular-15-spring-boot-jwt-auth/)

Fullstack with Django:
> [Angular + Django example](https://www.bezkoder.com/django-angular-13-crud-rest-framework/)

> [Angular + Django + MySQL](https://www.bezkoder.com/django-angular-mysql/)

> [Angular + Django + PostgreSQL](https://www.bezkoder.com/django-angular-postgresql/)

> [Angular + Django + MongoDB](https://www.bezkoder.com/django-angular-mongodb/)

Serverless with Firebase:
> [Angular 15 Firebase CRUD with Realtime DataBase](https://www.bezkoder.com/angular-15-firebase-crud/)

> [Angular 15 Firestore CRUD example](https://www.bezkoder.com/angular-15-firestore-crud/)

> [Angular 15 Firebase Storage: File Upload/Display/Delete example](https://www.bezkoder.com/angular-15-firebase-storage/)

Integration (run back-end & front-end on same server/port)
> [How to integrate Angular with Node Restful Services](https://www.bezkoder.com/integrate-angular-12-node-js/)

> [How to Integrate Angular with Spring Boot Rest API](https://www.bezkoder.com/integrate-angular-12-spring-boot/)