 }
      }

      // Initiate SSO authentication
      async function initiateSSO(providerId) {
        try {
          const redirectUri =
            window.location.origin + window.ROOT_PATH + `/auth/sso/callback/${providerId}`;
          const response = await fetch(
            window.ROOT_PATH + `/auth/sso/login/${providerId}?redirect_uri=${encodeURIComponent(redirectUri)}`,
          );

          if (!response.ok) throw new Error("Failed to initiate SSO");

          const data = await response.json