• Used to authenticate a user for a request, which can be when rendering a page or calling the API.

    Parameters

    • req: ReqType

      API Request object

    • res: ResType

      API Response object

    Returns Promise<string | false>

    Either string (the user's id), or false (unable to authenticate)