 pathname = document.querySelector(`meta[name="swa:originalPath"]`)?.content || window.location.pathname;
        if (pathname.includes("/.auth/login")) {
          return pathname.split("/").pop();
        } else {
          return null;
        }
      }
      function syncIdentityProviderFromUrl(formElement) {
        // @TODO handle unknown providers
        const identityProviderName = parseIdentityProviderFromUrl();
        const providerElement = $("#identityProvider");
        if (providerElement.va