as I am implementing a Discord login in my aspnetcore mvc application I stumbled upon something strange (for me) My application uses the discord OAuth2 to register new users which are handled by ASP.NET Core Identity.
So far so good.
After adding app.UseAuthorization() to provide my controllers with some [Authorize]-Attributes to easily handle accessibility for pages depending on the status of the login, my OAuth2 middleware stopped working properly.
It works fine until the challenge with discord (successfully) finishes, but it never returns to my callback path. Therefore the application cannot create users or let them log i.
Is there a way to combine them, so I can still add the Authorize-Attribute?