auth-vir - v2.3.8
    Preparing search index...

    Function handleAuthResponse

    • Store auth data on a client (frontend) after receiving an auth response from the host (backend). Specifically, this stores the CSRF token into local storage (which doesn't need to be a secret). Alternatively, if the given response failed, this will wipe the existing (if anyone) stored CSRF token.

      Parameters

      • response: Readonly<Pick<Response, "ok" | "headers">>
      • overrides: PartialWithUndefined<
            {
                csrfHeaderName: string;
                localStorage: Pick<Storage, "setItem" | "removeItem">;
            },
        > = {}

      Returns void

      Error if no CSRF token header is found.