auth-vir - v3.1.0
    Preparing search index...

    Function getCurrentCsrfToken

    • Used in client (frontend) code to retrieve the current CSRF token in order to send it with requests to the host (backend).

      Parameters

      • options: Readonly<
            _RequireExactlyOne<
                { csrfHeaderName: string; csrfHeaderPrefix: string },
                "csrfHeaderPrefix" | "csrfHeaderName",
            >,
        > & PartialWithUndefined<
            {
                allowedClockSkew: Readonly<AnyDuration>;
                localStorage: Pick<Storage, "getItem">;
            },
        >

      Returns Readonly<
          _RequireExactlyOne<
              { csrfToken: Readonly<CsrfToken>; failure: CsrfTokenFailureReason },
              "csrfToken" | "failure",
          >,
      >