[keycloak-user] keycloak.js with a different domain (cross domain problems)
juandiego83 at gmail.com
Thu Jun 4 14:04:19 EDT 2015
I am getting this error when I try to run this from my apache server
instead from my app with jboss,
XMLHttpRequest cannot load
'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://unika.localdomain' is therefore not allowed access
unica.localdomain is set on my /etc/hosts
Do I have to run my web app on the same server to avoid this?
GET http://localhost:8080/unika/test/undefined/realms/undefined/account 401
Also when I try to run it from as part of my war file on my server
12:48:27,159 WARN [org.keycloak.adapters.OAuthRequestAuthenticator]
(default task-122) No state cookie
task-127) Invoking deprecated endpoint
12:48:58,570 WARN [org.keycloak.adapters.OAuthRequestAuthenticator]
(default task-1) No state cookie
And I get a "bad request" on my browser.
My test app is basically the customer-portal-js example with a different
I also set in web.xml to secure some folders, and it works fine. So
basically when I log on to those folders and go back to my web-app it shows
the correct info.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the keycloak-user