I try to reach this keycloak endpoint: http://10.10.10.10:8999/auth/realms/demo-realm/protocol/openid-connect/token
I add the client_secret, grant_type and client_id. Then when I send the request from my frontend app, I get back this error:
Access to XMLHttpRequest at 'http://10.10.10.10:8999/auth/realms/demo-realm/protocol/openid-connect/token' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
My keycloak setup is the following:
-confidential client
-valid redirect URIs: *
-web origins: + or * (tried both)
Also tried to set valid uris to http://localhost:4200
and web origins +
or add the http://localhost:4200
to web origins.
It's important that the client have to be confidential or the access_token won't contain a resource-id when I try to use it...
Thanks in advance
http
calls, others about*
conflict. Can you serve your keycloak onhttps
? – Claudio Weilerredirect_uri
parameter? – Claudio Weiler