Is it possible to set a breakpoint on the [Authorize] Atrribute in my class? It has been causing Bad Request errors and I was wondering what inside the [Authorize] Attribute is causing it to do that.
Alternatively, is it possible to overwrite the [Authorize] Attribute and keep the originals functions after my conditions?
I get the BadRequest errors due to the way I am logging in as shown in this question: .NET Core 2.2 Shared Cookie causes Bad Request error when logging in
EDIT: Added Custom Authorize Attribute
public class ExtendedAuthorizeAttribute : AuthorizeAttribute
{
public async Task OnAuthorizationAsync(AuthorizationFilterContext authorizationFilterContext)
{
if (authorizationFilterContext.HttpContext.User.Identity.IsAuthenticated == false)
{
base.Function();
}
}
}