[OPEN-382] Enable Devise account lockout after failed logins - #630
Open
santostiago wants to merge 1 commit into
Open
[OPEN-382] Enable Devise account lockout after failed logins#630santostiago wants to merge 1 commit into
santostiago wants to merge 1 commit into
Conversation
Lock accounts after 10 failed attempts and allow unlock via email or after one hour, including the API login path that previously bypassed Devise lockable. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
When my other PR gets merged I'll rebase this one and the brakeman issue should be solved. |
Contributor
tsubik
requested changes
Jul 28, 2026
tsubik
left a comment
Contributor
There was a problem hiding this comment.
Looks good for the back office, only small issues. We also need to customize this for frontend apps. Not sure if in the same way as forgotten password, that is a lot of extra code to customize emails, or maybe there is a better way to keep the email but customize redirect after unlock - to not end up on backoffice log in page when operator account clicked unlock link.
Contributor
|
Or maybe we can start with only the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
:lockableso accounts lock after 10 failed sign-in attempts/loginendpoint (it previously bypassed Devise) and cover lock, unlock email, and unlock-link flows in specsTest plan
bundle exec rspec spec/integration/v1/sessions_spec.rbfailed_attemptsand lock after 10 attempts/admin/unlock?unlock_token=…unlocks the accountfailed_attemptsMade with Cursor