Facing CORS policy issue after configuring OpenID. #1572
-
Hi @stevespringett, I had configured Keycloak OpenID server on different machine. My DT is running on different machine. My DT's front end and api is mapped with DNS using NGINX. But when I am trying to login into DT using OpenID, I am facing CORS issue. Please guide... Docker-compose File Configuration is: ###################################################### ############################################################## DT Error: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @spmishra121 👋 The error you're seeing is caused by your Keycloak installation not setting any CORS response headers for the For example: $ curl -v -H "Origin: http://localhost:1234" http://localhost:8080/realms/test/.well-known/openid-configuration
* Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /realms/test/.well-known/openid-configuration HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.79.1
> Accept: */*
> Origin: http://localhost:1234
>
< HTTP/1.1 200 OK
...
< Access-Control-Allow-Origin: http://localhost:1234
< Access-Control-Allow-Credentials: true
... What version of Keycloak are you using? Is you Keycloak behind a load balancer or reverse proxy of some sort? If yes, is it possible that the |
Beta Was this translation helpful? Give feedback.
-
Thanks @nscuro, It's working now. |
Beta Was this translation helpful? Give feedback.
Thanks @nscuro, It's working now.