Hi,

the question is why you need Direct Grant Access in javascript application? I think it will be much better to use our javascript adapter and retrieve the access token with it: http://docs.jboss.org/keycloak/docs/1.2.0.Beta1/userguide/html/ch08.html#javascript-adapter

Marek

On 7.4.2015 10:24, Sadiq Khoja wrote:
Guys,

I want to enable CORS for Direct Grant Access, how to do it? I am getting following error from my javascript application:

(index):1 XMLHttpRequest cannot load http://localhost:8080/auth/realms/master/tokens/grants/access. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://pn.localhost:81' is therefore not allowed access. The response had HTTP status code 400.


Regards,

​​
Sadiq Khoja



_______________________________________________
keycloak-user mailing list
keycloak-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user