I have a problem with the interceptor, it does not add the Authorization Bearer header, it adds it well for keycloack requests exepmle: http: // awl-si-cap-keycloack3: 8080 / auth / realms / realm / account
but not for my queries coming out of my application, example : getUser
Any suggestion. Thank you
Hello @ayoubnejm,
I need more information about your scenario. Please let me know the angular version you are using in your project and your keycloak-angular init configuration.
To work the interceptor requires the use of angular's HttpClient. Are you using it in your requests?
I just ran into the same problem. Check your module imports. There must be only one HttpClientModule, typically in the app.module.
If imported anywhere else, remove it. It should work then. This is related to the behavior of HttpClientModule.
@ayoubnejm,
I'm closing this issue since it may be related to HttpClient or the module imports of HttpClientModule as reported by @nconcetti, thanks for your feedback @nconcetti!
Most helpful comment
I just ran into the same problem. Check your module imports. There must be only one HttpClientModule, typically in the app.module.
If imported anywhere else, remove it. It should work then. This is related to the behavior of HttpClientModule.