docs: function onStartAuthClick(e) {
      var elmBody = document.body;
  
      platform.isAuthenticated().catch(function (err) {
          // methods are registered globally for the popup to call on this main window
        window.onAuthCompleted = function() {
          // the platform SDK instance from the popup has
          // received a new auth token and saved it to the store.
          // Let's retrieve it for this instance.
          platform.refreshAuthFromStore();
  
          elmBody.innerHTML = compiledSuccess();
        };
        window.onAuthError = function() {
          elmBody.innerHTML = compiledError();
        };
  
        openPopup();
      });
    }