Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lockout_reset_timeout #191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gmhawash
Copy link

This branch allows for automatically resetting the second_factor_attmpts_count after a configurable timeout period set on lockout_reset_timeout.

return unless self.class.lockout_reset_timeout.present?

if should_reset_lockout?
update_attributes(second_factor_attempts_count: 0, second_factor_attempts_locked_at: nil)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update_attributes has been deprecated so think this would need to be update

https://apidock.com/rails/ActiveRecord/Base/update_attributes

@baarkerlounger
Copy link

Would you be able to add some tests for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants