Browse Source

Remove code argument from send_two_factor_authentication_code

master
Matt Mueller 11 years ago
parent
commit
d91d13fc1b
  1. 3
      lib/two_factor_authentication/hooks/two_factor_authenticatable.rb

3
lib/two_factor_authentication/hooks/two_factor_authenticatable.rb

@ -1,8 +1,7 @@
Warden::Manager.after_authentication do |user, auth, options| Warden::Manager.after_authentication do |user, auth, options|
if user.respond_to?(:need_two_factor_authentication?) if user.respond_to?(:need_two_factor_authentication?)
if auth.session(options[:scope])[:need_two_factor_authentication] = user.need_two_factor_authentication?(auth.request) if auth.session(options[:scope])[:need_two_factor_authentication] = user.need_two_factor_authentication?(auth.request)
code = user.otp_code user.send_two_factor_authentication_code
user.send_two_factor_authentication_code(code)
end end
end end
end end

Loading…
Cancel
Save