team-alembic / ash_authentication

The Ash Authentication framework
MIT License
96 stars 52 forks source link

Add `lockable` option to password strategy #824

Open sevenseacat opened 3 weeks ago

sevenseacat commented 3 weeks ago

To lock the user account after a set number of failed sign in attempts.

Config:

From Slack:

You could have a resource for tracking login attempts, could store that in ETS, and then store locked_until on the user, and then add some logic to the action to check if that username has been locked before running the query, and if so return a locked error.