@cfxlabsinc/b2b-services
    Preparing search index...

    A cookie value the server alone can have written: base64url JSON plus an HMAC-SHA256 over it, keyed by HKDF from secret with label as the info, so each use gets its own key and one cookie can't stand in for another. Every payload carries its own exp, so a copied value dies with its cookie.

    type CookieSigner = {
        sign(payload: unknown, options: { maxAgeSeconds: number }): string;
        verify(value: string | undefined): unknown;
    }
    Index
    • Parameters

      • payload: unknown
      • options: { maxAgeSeconds: number }

      Returns string

    • The payload, or null for a missing, malformed, tampered or expired value.

      Parameters

      • value: string | undefined

      Returns unknown