Cannot get custom authentication scheme name to work with ASP.Net Core
My ultimate goal is to implement multiple authentication schemes in ASP.Net Core, but I cannot even seem to get a single custom scheme to work. I have included excerpts of my code below. You will see that I have hard coded “Bearer” as the scheme in 3 places. This completely works every time. However, if I change these 3 instances from “Bearer” to “Scheme2”, it fails, because the service does not authenticate the user. I can clearly see this in the dubugger where the User.IsAuthenticated flag is false.
Does not show @User.Identity.Name after login in ASP.NET
I Change my user table to Client and get some information in claim: