In my Razor Pages website, I have the ability to delete users.
However, if a user is logged in, I delete them, and then they attempt to navigate the site, they get a 500 server error.
This is definitely not what I want. I’d like them either to be redirected to the login page, or even a custom error page would be much better than what they have now.
Has anyone figured this out yet?