[keycloak-user] keycloak.js - token refresh- Bad request 400 - cors

java_os java at neposoft.com
Fri Jan 13 19:58:25 EST 2017


Yes, set origins to *. also the app works well: ng-kc broker-idp-redirects
back to my app. As said no issues on regular workflow of the app. even
logout works fine. it's only when token expires am getting this error.
more clues?
What you mean by proper setup of web origin? whats proper. Thout if set to
* would do it.
thx
> Did you setup proper web origins and redirect URIs for your app?
>
> On 12 January 2017 at 17:18, java_os <java at neposoft.com> wrote:
>
>> Hi group
>> Am using ng with keycloak.js (2.5.0.Final).
>> When token expires keycloak.js is intercepting token expired and does a
>> renew call when it fails(see client side stack below).
>> Anyone has any clue around this behavior?
>> My app is running on 9443 and KC on 8543 over https - all working fine
>> up
>> to the point when refresh token kicks in.
>> Behind the scenes is the cors stuff.
>> Thanks
>>
>> keycloak.js:451 POST
>> https://EDIT:8543/auth/realms/EDIT/protocol/openid-connect/token 400
>> (Bad
>> Request)
>>
>> exec @ keycloak.js:451
>> (anonymous) @ keycloak.js:459
>>
>> setSuccess @ keycloak.js:773
>>
>> messageCallback @ keycloak.js:854
>> :9443/EDIT/#/EDIT/home:1
>> XMLHttpRequest cannot load
>> https://EDIT:8543/auth/realms/EDIT/protocol/openid-connect/token. No
>> 'Access-Control-Allow-Origin' header is present on the requested
>> resource.
>> Origin 'https://EDIT:9443' is therefore not allowed access. The response
>> had HTTP status code 400.
>>
>>
>>
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>
>




More information about the keycloak-user mailing list