auth-vir - v1.3.1
    Preparing search index...

    Function extractUserIdFromRequestHeaders

    • Extract the user id from a request by checking both the request cookie and CSRF token. This is used by host (backend) code to help verify a request. After extracting the user id using this, you should compare it to users stored in your database.

      Parameters

      Returns Promise<undefined | string>

      The extracted user id or undefined if no valid auth headers exist.