1

So I'm using oidc-client on a react app to have my users SSO to Azure AD. Everything works fine...

...except, about every X minutes or so the page will refresh with this in the console (X seems to be between 30 and 60 minutes).

enter image description here

Here's the error text in the image above:

BSSO Telemetry: 

{
  "result": "Reload",
  "error": null,
  "type": "ChromeSsoTelemetry",
  "data": {
    "extension.id": "ppnbnpeolgkicgegkbkbjmhlideopiji"
  },
  "traces": [
    "BrowserSSO Initialized",
    "Creating ChromeBrowserCore provider",
    "Sending message for method CreateProviderAsync",
    "Received message for method CreateProviderAsync",
    "Using Chrome extension with id ppnbnpeolgkicgegkbkbjmhlideopiji",
    "Pulling SSO cookies",
    "Sending message for method GetCookies",
    "Received message for method Response",
    "SSO cookie detected. Refreshing page."
  ]
}

VM146 oidc-client.min.js:42 Uncaught SyntaxError: Unexpected token 'else'
VM147 silent-refresh.html:11 Uncaught ReferenceError: Oidc is not defined

Here's what I've got in my silent-refresh.html:

<head>
  <title></title>
</head>
<body>
  <script src="oidc-client.min.js"></script>
  <script>
    // debugger;
    let userManager = new Oidc.UserManager()
    try {
      userManager.signinSilentCallback()
    } catch (err) {
      console.log('silent sign in failed')
      console.log(err)
    }
  </script>
</body>

And I've just got a oidc-client.min.js file sitting next to it that I got from here.

What I've tried

  • Removed Redux dev tools
  • Removed React dev tools
  • Changed the accessTokenExpiringNotificationTime property that's passed to UserManager()
    • It's currently set to 600 (10 minutes). When I change it to 60 (1 minute) there is no difference. The refresh still happens around the same time frame. When I change it to 3600 or 7200 (1 or 2 hours) the error and refresh happens immediately.
LCIII
  • 1,479
  • 2
  • 17
  • 32

1 Answers1

1

Looks like a bug in the oidc-client library. Please create an issue in Github.

Alfredo R
  • 1,833
  • 1
  • 8
  • 12