I created ASP.Net Core MVC project from template with enabled Identity.
I created db from migration files using update-database command.
I was able to run application, register users and login.
I added AuthorizeFilter globally:
builder.Services.AddControllersWithViews(o => o.Filters.Add(new AuthorizeFilter()));
it still worked.
But when I scaffolded Login page using Visual Studio functionality, I wasn't able to login anymore. I was being redirecting to "infinitelly" looped url:
When I remove global AuthorizeFilter:
builder.Services.AddControllersWithViews()
and add it over Action:
[Authorize]
public IActionResult Index()
It works again.
Is there any bug preventing using scaffolded Razor Pages with global AuthorizeFilter? Or rather I did something wrong or missed?