I am trying to get the nodeJS keycloak adapter working with my Express application, but am facing a CORS issue when it tries to redirect to the login page for routes I have
I am also working on this issue with mindparse.
I think the key issue here is that the keycloak server is not responding with any ACCESS-CONTROL-ALLOW-ORIGIN headers despite the fact that he has correctly configured the "web Origins" setting in the keycloak admin portal.
A more in depth flow of the process is:
Just put the url of your app like "http://localhost:8081" in "Web Origins" field of client settings in Keycloak.
I had the exact same problem. I am using Keycloak 6.0.1
In my case, I had to add "enable-cors": true in keycloak.json in my Java backend server.
Afterward, I had another issue: 401 UNAUTHORIZED.
This post solved the problem