I have a middleware on my asp.net core application and I am trying to acccess the user identity/user name through httpContext class but, the value is always empty.

   public async Task Invoke(HttpContext httpContext)
{
           httpContext.User
}

How to get the current user identity inside the middleware

Related posts

Recent Viewed