0

Here is my client config:

const settings = {
      userStore: new WebStorageStateStore({ store: window.localStorage }),
      client_id: 'authtest',
      automaticSilentRenew: true,
      accessTokenExpiringNotificationTime: 10,
      response_type: 'code',
      scope: 'openid profile email offline_access',
    };

Silent refresh page is a static html page

<!DOCTYPE html>
<html>
  <head>
    <title>Silent Renew Token</title>
  </head>
  <body>
    <script
      src="https://cdnjs.cloudflare.com/ajax/libs/oidc-client/1.11.5/oidc-client.min.js"
      integrity="sha512-pGtU1n/6GJ8fu6bjYVGIOT9Dphaw5IWPwVlqkpvVgqBxFkvdNbytUh0H8AP15NYF777P4D3XEeA/uDWFCpSQ1g=="
      crossorigin="anonymous"
      referrerpolicy="no-referrer"
    ></script>
    <script>
      console.log('renewing tokens');
      new Oidc.UserManager({
        userStore: new Oidc.WebStorageStateStore({ store: window.localStorage }),
      }).signinSilentCallback();
    </script>
  </body>
</html>

I wanted to check how exactly it works and there is something strange: token request is being sent multiple times (6x)

Is this supposed to work like that? My [PersistedGrant] table is growing very fast during this test (6 records every 50 seconds). What is the problem and how to solve it?

Cezar
  • 345
  • 6
  • 18
  • could you show the settings for _authtest_ client on identityserver side? looks like your `AccessTokenLifetime` is too short (20 seconds or less) – d_f Dec 22 '21 at 12:32
  • @d_f I set `AccessTokenLifetime` to 60 seconds just for test how it works. – Cezar Dec 22 '21 at 12:44

0 Answers0