
        const data = localStorage[hashStorageKey(formElement)];
        document.cookie = `StaticWebAppsAuthCookie=${btoa(data)}; path=/`;
      }
      function redirectToApp() {
        const defaultRedirectPath = "/";
        try {
          const metaSearch = document.querySelector(`meta[name="swa:originalSearch"]`)?.content || "";
          const redirectPath = metaSearch || window.location.search || defaultRedirectPath;
          const urlSearch = (metaSearch || location.search).replace("?", "");
   