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

Stian Thorgersen sthorger at redhat.com
Tue Jan 24 02:46:10 EST 2017


Works fine here and I can't reproduce it. Refreshing tokens works like a
charm and I've got apps running on different port to KC like you do. I
believe this is quite likely an issue at your end as we do have quite a lot
of folks using keycloak.js and no one else have complained about this.

You'll need to give us steps to reproduce or at least more details to go on.

On 23 January 2017 at 21:15, java_os <java at neposoft.com> wrote:

> I still believe this is a bug in 2.5.0.Final
> The flow is client using keycloak.js - and as far am concern it runs fine
> until the point where token expires at which point the re-new process goes
> into 400 origins. Would be easy for you guys to re-create this on your
> end.
> thx
>
> > Strange - it's the same endpoint that is called for code->token and token
> > refresh, so can't see why one would work and not the other.
> >
> > On 14 January 2017 at 01:58, java_os <java at neposoft.com> wrote:
> >
> >> 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