• Retrieves a cookie value from the Hono context object and verifies its signature.

    Parameters

    • context: Context<any, any, {}>

      The Hono context object.

    • key: CryptoKey

      The key used for signing the cookie.

    • name: string

      The name of the cookie to retrieve.

    • ignoreMiddleware: boolean = false

      Whether to ignore the cookie signature middleware.

    Returns Promise<undefined | string>

    The verified cookie value, or undefined if the cookie is not found or is invalid.

    Throws

    An error if the cookie signature middleware is used and the cookie is already verified. (If not desired, set "ignoreMiddleware" to true)

Generated using TypeDoc