First - I'm still learning Identity Core (and .NET core in general). I'm using Google Authentication (internal only project). I tested an account and deleted it. I noticed even after deleting it from the database I can still browse around in secured parts of the page.
Is there a way to automatically log the user out if the account is no longer valid?
This is what the validation interval is supposed to do
Configure<SecurityStampValidatorOptions>(options => options.ValidationInterval = TimeSpan.FromSeconds(10));
There is also a callback OnRefreshingPrincipal you can use to plug custom logic
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With