<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>I am getting this error when I try to run this from my apache server instead from my app with jboss,<br><br>XMLHttpRequest cannot load <a href="http://unika.localdomain:8080/auth/realms/unika/tokens/access/codes">http://unika.localdomain:8080/auth/realms/unika/tokens/access/codes</a>. No &#39;Access-Control-Allow-Origin&#39; header is present on the requested resource. Origin &#39;<a href="http://unika.localdomain">http://unika.localdomain</a>&#39; is therefore not allowed access<br><br></div>unica.localdomain is set on my /etc/hosts<br><br></div>Do I have to run my web app on the same server to avoid this?<br><br>GET <a href="http://localhost:8080/unika/test/undefined/realms/undefined/account">http://localhost:8080/unika/test/undefined/realms/undefined/account</a> 401 (Unauthorized)<br><br><br></div>Also when I try to run it from as part of my war file on my server <br>12:48:27,159 WARN  [org.keycloak.adapters.OAuthRequestAuthenticator] (default task-122) No state cookie<br>12:48:56,153 WARN  [org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint] (default task-127) Invoking deprecated endpoint <a href="http://localhost:8080/auth/realms/unika/tokens/login?client_id=unika-angular&amp;redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Funika%2Ftest%2Fcustomers%2Fview.html&amp;state=48084ae8-d454-4e7e-8c42-01c51ec09a3c&amp;response_type=code">http://localhost:8080/auth/realms/unika/tokens/login?client_id=unika-angular&amp;redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Funika%2Ftest%2Fcustomers%2Fview.html&amp;state=48084ae8-d454-4e7e-8c42-01c51ec09a3c&amp;response_type=code</a><br>12:48:58,570 WARN  [org.keycloak.adapters.OAuthRequestAuthenticator] (default task-1) No state cookie<br><br></div><div>And I get a &quot;bad request&quot; on my browser.<br></div><div><br></div><div>My test app is basically the customer-portal-js example with a different keycloak.json file<br></div><div><br><br></div><div>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.<br><br></div><div>thanks,<br><br></div><div>Juan Diego<br></div><div><div><div><br><br><br></div></div></div></div>