So I have my authentication service, AuthService, that basically has two methods, one that gets a new token from the server, given a username and a password
I was running into the same or a similar issue using Angular 6.1.10. I simply instantiated HttpClient myself inside the service that need to be injected into an HttpInterceptor:
@Injectable()
export class AuthService {
private http: HttpClient;
constructor(httpBackend: HttpBackend) {
this.http = new HttpClient(httpBackend);
}
}
That broke the infinite loop issue in my case.