SSO management

When the Sitecore Content Hub is using single sign-on (SSO), it is possible that the Web SDK will crash after seemingly random intervals.

What happens is that the authentication token of the Web SDK expires (e.g. after X amount of requests) and the Web SDK is redirected from the Sitecore Content Hub to the SSO page. This results in unexpected responses for the Web SDK.

To fix this issue, the Web SDK has the option to register the SSO URLs, so that the SDK can handle this redirect correctly. When the SDK detects that it was redirected to a known SSO host, it will automatically re-authenticate.

For example, when https://sso.example.provider.com is the SSO domain, then it can be registered as follows:

Uri[] ssoLinks = new[] { new Uri("https://sso.example.provider.com") };

The Web SDK uses the Authority part of the URL to check for known SSO redirects, see https://docs.microsoft.com/en-us/dotnet/api/system.uri.authority for more information.

Can we improve this article ? Provide feedback