dotnet / dotnet/aspnetcore

Is there any way to lock out a user? Could this be added?

Open
#58,966 4 comments 0 reactions 0 assignees View on GitHub
area-identity enhancement
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

I need a way to lock out a user. Not from too many login attempts. But because I want to deny them access to the site without deleting their account.

I've found you can set `LockoutEnd` to a date and time in the future, and that user will not be able to log in. However, by default, users don't need to log in every time they go to the site. The site remembers their login for something like 30 days. So they would be able to continue using the site for up to 30 days!

Is there any way to lock them out immediately?

Is there any way this sort of feature could be baked in? Does this require me to write my own middleware? If so, has anyone done this already?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.