CanKattwinkel / starter

Simple starter with Angular Client, NestJS API and Postgres + TypeORM DB. Implements things from i18n to XSRF and JWT.
5 stars 1 forks source link

Prevent multiple token renewal #1

Open CanKattwinkel opened 6 years ago

CanKattwinkel commented 6 years ago

Given the following situation:

User is logged in, has a valid refresh token but an outdated access token. If he now initiates two HTTP requests at the same time, then the http interceptor will trigger the refreshment twice. Probably adding a BehaviorSubject to the Interceptor and delaying the execution will resolve this issue.

Fixed when: