3

I have a setup with redux-oidc authenticating against an identity server. I can log in, and I can see that silenRenew works as expected when the token expires.

There is one problem though. If I open my site and let the computer go to sleep, when I get back after the expiration period, silent renew has failed with this error:

Frame window timed out

It does not try again once i wake up the computer. Not even when I reload the page.

Is this the expected behavior?

If so, what is the correct way of handling this so the site is not left dead?

If not, does anyone have any idea what I might be doing wrong?

Sune
  • 1,326
  • 1
  • 11
  • 17

2 Answers2

1

I had faced similar issue , so i did a work-around which looks ugly but still works fine for me, look for comments in the code

 this.userManager = new Oidc.UserManager(oidcSettings);

            this.userManager.events.addAccessTokenExpiring(() =>
            {
                this.userManager.signinSilent({scope: oidcSettings.scope, response_type: oidcSettings.response_type})
                    .then((user: Oidc.User) =>
                    {
                        this.handleUser(user);
                    })
                    .catch((error: Error) =>
                    {
                        // Currently as a dirty work around (looks like problem with gluu server. Need to test with other IDP's as well)
                        // in order to get the new issued token I just calling getUser() straight after signinSilent().then() promise failing with frame time out
                        // https://github.com/IdentityModel/oidc-client-js/issues/362
                        this.userManager.getUser()
                            .then((user: Oidc.User) =>
                            {
                                this.handleUser(user);
                            });
                    });
            });
Sohan
  • 6,252
  • 5
  • 35
  • 56
0

Take a look at the logs. It usually tells you what's wrong. On all the situations I faced this error it was due I missed redirect uris on the server. Everything you setup on the client needs to be reflected on the server, otherwise, any callback (callback.html, popup.html, and silent.html for instance from the IS examples), session renewal will fail.

Tomamais
  • 95
  • 3
  • 9