<div dir="ltr">It helps if you add more details when you ask questions. I assume you are trying to get keycloak.js to work as you're dealing with CORS. To get that to work you need to create a client in Keycloak then set the following values:<div><br></div><div>* Access type: public</div><div>* Valid Redirect URIs - the URL of your application (if it's <a href="http://localhost:8080/myapp/index.html">http://localhost:8080/myapp/index.html</a> you can set it to <a href="http://localhost:8080/myapp/*">http://localhost:8080/myapp/*</a>)</div><div>* Web Origins - once you've clicked save this field pops up, make sure it has the origin of your application (this is what enables cors requests, if you don't know what that is google it). The origin is url schema, hostname and port bit, without context path (so <a href="http://localhost:8080">http://localhost:8080</a> for example)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 4 December 2015 at 13:38, Stian Thorgersen <span dir="ltr"><<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Did you add origins to your client?</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 4 December 2015 at 05:51, Sajjad Murtaza <span dir="ltr"><<a href="mailto:sajjadmurtaza.nxb@gmail.com" target="_blank">sajjadmurtaza.nxb@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><span style="font-size:12.8px">Am facing following error</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">XMLHttpRequest cannot load <a href="https://keycloak-dcdevelopment.rhcloud.com/auth/realms/demo/protocol/openid-connect/token" target="_blank">https://keycloak-dcdevelopment.rhcloud.com/auth/realms/demo/protocol/openid-connect/token</a>. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://localhost:8080/" target="_blank">http://localhost:8080</a>' is therefore not allowed access.<br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I'm trying to authenticate with keycloak.</div></div>
<br></div></div>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div>
</blockquote></div><br></div>