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

    Function generateSuccessfulLoginHeaders

    • Used by host (backend) code to set headers on a response object.

      Parameters

      • userId: string | number

        The id from your database of the user you're authenticating.

      • cookieConfig: Readonly<CookieParams>
      • csrfHeaderNameOption: Readonly<
            _RequireExactlyOne<
                { csrfHeaderName: string; csrfHeaderPrefix: string },
                "csrfHeaderPrefix" | "csrfHeaderName",
            >,
        >
      • OptionalsessionStartedAt: number

        The timestamp (in seconds) when the session originally started. If not provided, the current time will be used (for new sessions).

      Returns Promise<Record<string, string>>