While I was migrating an ASP.NET Core 1 project to version 2 my authentication code stopped working. After some investigation I kept running across this info message in my application logs which seemed unusual:
Turns out this is a simple issue to fix. Just make sure that in the Configure() method in the Startup class contains a call to app.UseAuthentication() before the call to app.UseMvc() for example:
With this method updated to include the Authentication middleware, the issue should be resolved.