[keycloak-user] Problem with keycloak.js
Stian Thorgersen
stian at redhat.com
Tue Jun 3 04:23:59 EDT 2014
Yep, that is indeed what's missing. Can you do a PR for this please?
----- Original Message -----
> From: "Jim Boettcher" <jim.boettcher at hp.com>
> To: keycloak-user at lists.jboss.org
> Sent: Monday, 2 June, 2014 8:41:28 PM
> Subject: [keycloak-user] Problem with keycloak.js
>
>
>
> Hi,
>
>
>
> We have written an AngularJS client that uses the keycloak.js adapter to get
> a bearer token and then makes REST calls using the token. The client also
> stores the token and refresh token to local storage and uses the token from
> local storage if it is found. This all worked well with the pre-beta1
> keycloak.js adapter.
>
> With the beta1 keycloak.js adapter it works the first time we access the
> page, we get redirected to the login page and get the tokens back. However
> the client app seems to hang when we use the token found in local storage.
> After looking at the code it seems that a line might be missing in the
> function processInit().
>
> Starting at line 58 I made the following code change:
>
> if (initOptions.token || initOptions.refreshToken) {
>
> setToken(initOptions.token, initOptions.refreshToken);
>
> initPromise.setSuccess(); //Added this line to get things working
>
>
>
> After this change our code started working again.
>
> Can someone take a look at this and advise us if this is correct?
>
>
>
> Thank you
>
> _______________________________________________
> 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