auth/RedirectForm.tsx

casdoor · web/src/components/auth/RedirectForm.tsx · typescript · Apache-2.0
ui

Auto-submitting form for SAML POST binding.

// Source: https://github.com/casdoor/casdoor | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import * as React from "react";
import i18next from "i18next";

/** Auto-submitting form used by the SAML POST binding. */
export function RedirectForm({
  samlResponse,
  redirectUrl,
  relayState,
}: {
  samlResponse: string;
  redirectUrl: string;
  relayState: string;
}) {
  React.useEffect(() => {
    (document.getElementById("saml") as HTMLFormElement | null)?.submit();
  }, []);

  return (
    <div className="flex min-h-screen items-center justify-center">
      <p className="text-muted-foreground">{i18next.t("login:Redirecting, please wait.")}</p>
      <form id="saml" method="po

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key