Sha256: 8b56e0757ff3a6898a2354b5c56a373bc71ab62e36c3e266b4e63e6ea30aa5a5
Contents?: true
Size: 408 Bytes
Versions: 36
Compression:
Stored size: 408 Bytes
Contents
# After each sign in, if resource responds to failed_attempts, sets it to 0 # This is only triggered when the user is explicitly set (with set_user) Warden::Manager.after_set_user except: :fetch do |record, warden, options| if record.respond_to?(:failed_attempts) && warden.authenticated?(options[:scope]) record.update_attribute(:failed_attempts, 0) unless record.failed_attempts.to_i.zero? end end
Version data entries
36 entries across 36 versions & 7 rubygems