1

I have integrated keycloak with my angularJS app.While I running the app after login page, The browser console showing.

XMLHttpRequest cannot load http://192.168.1.7:8080/auth/realms/app1/protocol/openid-connect/token. Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values '*, http://192.168.1.7:8000', but only one is allowed. Origin 'http://192.168.1.7:8000' is therefore not allowed access.
boycod3
  • 5,033
  • 11
  • 58
  • 87

1 Answers1

2

You need to set the Web Origins property for your client in the KC Web Console.

Sébastien Blanc
  • 2,929
  • 1
  • 12
  • 11
  • Could you try with `*` just to see if it works then ? – Sébastien Blanc Jul 11 '17 at 10:02
  • 1
    It looks like your Web Origins is set to `*, http://192.168.1.7:8000` but you can only have one value here. It is NOT a comma separated list. If you want to add multiple values then you must add a new line. Also, your ports don't match up. You have 8080 in one location and 8000 in another. Try to use ONLY `*`. – Jerry Saravia Jul 13 '17 at 15:56