lacewing - v2.0.1
    Preparing search index...

    Function readTokenCookie

    • Read a token cookie from a request. Accepts a Headers object, anything with a .headers (e.g. Request), or the raw Cookie header string. Returns undefined when absent or malformed.

      Throws TypeError on a shape it does not accept - notably a Node/Express request, whose headers is a plain record. "I was handed something I don't understand" must not be indistinguishable from "this request carried no token".

      Parameters

      Returns string | undefined