Sha256: 388ecafe3dde1b1b39db9200570b7309a113c402ff11b23c01123399137830a8

Contents?: true

Size: 390 Bytes

Versions: 12

Compression:

Stored size: 390 Bytes

Contents

# frozen_string_literal: true

# 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?(:reset_failed_attempts!) && warden.authenticated?(options[:scope])
    record.reset_failed_attempts!
  end
end

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/devise-4.9.4/lib/devise/hooks/lockable.rb
devise-4.9.4 lib/devise/hooks/lockable.rb
kingsman-0.1.1 lib/kingsman/hooks/lockable.rb
kingsman-0.1.0 lib/kingsman/hooks/lockable.rb
devise-4.9.3 lib/devise/hooks/lockable.rb
devise-4.9.2 lib/devise/hooks/lockable.rb
devise-4.9.1 lib/devise/hooks/lockable.rb
devise-4.9.0 lib/devise/hooks/lockable.rb
devise-4.8.1 lib/devise/hooks/lockable.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/devise-4.8.0/lib/devise/hooks/lockable.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/devise-4.8.0/lib/devise/hooks/lockable.rb
devise-4.8.0 lib/devise/hooks/lockable.rb