Skip to content

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.

2 participants