Closed majuabir closed 7 months ago
It works now somehow. Maybe I misremembered building it or something I'm not sure. As far as I know the code as seen functions.
Hey! I have the exact same issue right now. Should I create new issue for it?
P.S. Fixed it. For other people using Angular 18, you have to do:
provideHttpClient(withInterceptorsFromDi()),
Bug Report or Feature Request (mark with an
x
)Versions.
Angular: 17.3.1 Keycloak-angular: 15.2.1 Keycloak: 22.0.5
Repro steps.
The HttpClient Interceptor appears to not add the Authorization: Bearer header to my requests to my backend server. I have this setup below. What might I be doing wrong?
For making requests to my backend I have this wrapper function that I invoke here:
The log given by the failure.
Desired functionality.
The Authorization: Bearer header is automatically applied to requests to my backend server.