Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

81
Views
OIDC client silent refresh multiple times

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?

7 months ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.