I have a backend resource server secured with keycloak
and a React front end application using keycloak javascript adapter
I have successfully obtained an access token in the front end to use it when accessing backend protected services.
when i call a backend service using the access token i get 401 Unauthorized error.
indicating
WWW-Authenticate Bearer error=“invalid_token”, error_description=“An error occurred while attempting to decode the Jwt: Invalid token”,
I have this problem on my docker environment,
If i run the application without using docker i can access the backend service successfully.
I had previously a connection refused error with docker which i resolve it by setting server_name=host.docker.internal
Do anyone have an idea of what could be the problem this time?
Thank you in advance for your help.
You can see the error in the screenshot below: