Skip to content

OAuthBearerAuthenticationHandler invalid bearer token received #362

@iamkarlson

Description

@iamkarlson

Hi,
When I switched on logs for authentication I started receiving these messages without stating a reason why it's invalid:

w3wp[15608]: 2020-06-23 15:09:18.4038|WARN|Microsoft.Owin.Security.OAuth.OAuthBearerAuthenticationMiddleware|Microsoft.Owin.Security.OAuth.OAuthBearerAuthenticationHandler.AuthenticateCoreAsync|invalid bearer token received

However, everything works pretty well and I can get all the data from tokens and deserialize claims, etc.

What I understood from the code is that this occurs when asp.net can't properly deserialize an auth ticket from the context (https://github.com/aspnet/AspNetKatana/blob/dev/src/Microsoft.Owin.Security.OAuth/OAuthBearerAuthenticationHandler.cs#L62). Is there any chance that a proper reason specified in the message? I tried to figure out how can I do that myself but it seems that it's stuck on decrypting ticket from the binary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions