79506762

Date: 2025-03-13 14:35:08
Score: 0.5
Natty:
Report link

If your middleware method is actually async:

public async Task InvokeAsync(HttpContext context)

You can simply return:

if (User == null)
{
    await _signInManager.SignOutAsync();
    context.Response.Redirect("/");
    return;
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: JKH