Purpose:

If your site main domain is not a subdomain of Druid main domain, you will <<not have single sign on>> with other sites, due to security restrictions in web browsers with cookies and domains.

if your site is in this case, you have to import a js file in all your pages:

(Please change domain .dru-id.com with installation domain)

Now when an user navigates to a site configured with sso for first time, but is logged in druid, this script will do his work, and by default will reload entire page, allowing SDK to take charge of the user session.

 

If you want to get more control, you can define your own callback:

this callback will be called if local sdk cookie does not exists, or remote cookie value changes.