• Default cookie AuthenticationFunction. This function will check the token present in the request's accessToken cookie.

    Note that for app access tokens, the bearer header will be checked instead.

    1. Bearer token is fetched from the Authorization header
    2. If bearer token is an app access token, return token payload, otherwise ignore
    3. Token is fetched and decoded from the accessToken cookie
    4. If not an access token, throw error
    5. If an app access token, throw error
    6. If a user access token, perform security checks, throw error if fails. Otherwise return token payload
    • If token is mismatched fingerprint with the request, throw error
    1. Otherwise, throw error

    Parameters

    Returns Promise<AccessTokenInfo>

    Token payload

Generated using TypeDoc