docs: function onTokenWillRefresh(callback) {
      // 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();
        callback();
      };
      window.onAuthError = function() {
        elmBody.innerHTML = compiledError();
      };
  
      openPopup();
    }