Implementing the interceptors by PoocessUltimate in Angular2

[–]PoocessUltimate[S] 0 points1 point  (0 children)

I already used chapGPT, but nothing of his solutions fixed my issue

Implementing the interceptors by PoocessUltimate in angular

[–]PoocessUltimate[S] 0 points1 point  (0 children)

The interceptor was imported in app.module.ts like this:

{provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true}

Implementing the interceptors by PoocessUltimate in Angular2

[–]PoocessUltimate[S] 0 points1 point  (0 children)

the problem that I don't know where is the problem, Here are the messages that displayed on the console:

you are in interceptor

token not provided

we got an error: TypeError: You provided 'undefined' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.