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

Version Path
devise-4.2.0 lib/devise/hooks/lockable.rb
devise-3.5.10 lib/devise/hooks/lockable.rb
devise-4.0.3 lib/devise/hooks/lockable.rb
devise-4.1.1 lib/devise/hooks/lockable.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/devise-4.1.0/lib/devise/hooks/lockable.rb
devise-4.1.0 lib/devise/hooks/lockable.rb
devise-3.5.9 lib/devise/hooks/lockable.rb
devise-4.0.2 lib/devise/hooks/lockable.rb
devise-4.0.1 lib/devise/hooks/lockable.rb
devise-3.5.8 lib/devise/hooks/lockable.rb
devise-3.5.7 lib/devise/hooks/lockable.rb
devise-4.0.0 lib/devise/hooks/lockable.rb
devise-4.0.0.rc2 lib/devise/hooks/lockable.rb
devise-4.0.0.rc1 lib/devise/hooks/lockable.rb
devise-3.5.6 lib/devise/hooks/lockable.rb
devise-3.5.5 lib/devise/hooks/lockable.rb
devise-3.5.4 lib/devise/hooks/lockable.rb
devise-3.5.3 lib/devise/hooks/lockable.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/devise-3.5.2/lib/devise/hooks/lockable.rb
devise-3.5.2 lib/devise/hooks/lockable.rb