Sha256: 81bd4bf400c203dc501ed42e5f231247ecf7120fa1b7f8a90bf45f40504282a3

Contents?: true

Size: 326 Bytes

Versions: 2

Compression:

Stored size: 326 Bytes

Contents

# frozen_string_literal: true

Warden::Manager.after_set_user except: :fetch do |record, warden, options|
  scope = options[:scope]
  if record.respond_to?(:remember_me) && options[:store] != false &&
     record.remember_me && warden.authenticated?(scope)
    Kingsman::Hooks::Proxy.new(warden).remember_me(record)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kingsman-0.1.1 lib/kingsman/hooks/rememberable.rb
kingsman-0.1.0 lib/kingsman/hooks/rememberable.rb