add refresh token
This commit is contained in:
@@ -53,10 +53,9 @@ export class JwtInterceptor implements HttpInterceptor {
|
||||
this.isRefreshing = false;
|
||||
this.refreshTokenSubject.error(err);
|
||||
|
||||
// In a refresh failure, the user MUST be logged out.
|
||||
// Call the synchronous client-side logout to avoid re-intercepting.
|
||||
this.authService.clientSideLogout();
|
||||
|
||||
// The interceptor's job is done. It failed to refresh.
|
||||
// It should NOT handle logout. It should just propagate the error.
|
||||
// The calling service/component will be responsible for the user-facing action.
|
||||
return throwError(() => err);
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user