If JWTs are used for security, there are use cases for using short-lived tokens — for example, if you use the token in a URL that gets opened. To make that possible, the Angular frontend needs to refresh the token before it expires automatically. To make that possible, Angular and RxJs features are used in the frontend and a Spring Boot REST endpoint checks and updates the JWT in the backend.
The frontend design is based on the concepts explained in this article. It is a valuable resource about caching with RxJs.
If JWTs are used for security, there are use cases for using short-lived tokens — for example, if you use the token in a URL that gets opened. To make that possible, the Angular frontend needs to refresh the token before it expires automatically. To make that possible, Angular and RxJs features are used in the frontend and a Spring Boot REST endpoint checks and updates the JWT in the backend.
The frontend design is based on the concepts explained in this article. It is a valuable resource about caching with RxJs. […]