diff --git a/src/services/token-refresh.service.ts b/src/services/token-refresh.service.ts index f11660a..9ea9ec4 100644 --- a/src/services/token-refresh.service.ts +++ b/src/services/token-refresh.service.ts @@ -34,7 +34,7 @@ export class TokenRefreshService { this.authService.refreshToken() .pipe( catchError(error => { - if (error.status === 403 || error.status === 401) { + if (error.status === 403 || error.status === 401 || !localStorage.getItem(ApiService.tokenKey)) { localStorage.removeItem(ApiService.tokenKey); this.refreshTokenExpireMs = -1; return of(undefined);