Sha256: e82240fea887c171b3967bd7b190580925f87f3093a221a234d867096d99b814

Contents?: true

Size: 295 Bytes

Versions: 25

Compression:

Stored size: 295 Bytes

Contents

Warden::Manager.after_authentication do |user, auth, options|
  if user.respond_to?(:with_authy_authentication?)
    if auth.session(options[:scope])[:with_authy_authentication] = user.with_authy_authentication?(auth.request)
      auth.session(options[:scope])[:id] = user.id
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
devise-authy-2.3.1 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-2.3.0 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-2.2.1 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-2.2.0 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-2.1.0 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-2.0.0 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-1.11.1 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-1.11.0 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-1.10.0 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-1.9.0 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-1.8.3 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-1.8.2 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-1.8.1 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-1.8.0 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-1.7.0 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-1.6.0 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-1.5.3 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-1.5.2 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-1.5.1 lib/devise-authy/hooks/authy_authenticatable.rb
devise-authy-1.5.0 lib/devise-authy/hooks/authy_authenticatable.rb