app/controllers/devise_authy/passwords_controller.rb in devise-authy-1.5.3 vs app/controllers/devise_authy/passwords_controller.rb in devise-authy-1.6.0
- old
+ new
@@ -1,12 +1,12 @@
class DeviseAuthy::PasswordsController < Devise::PasswordsController
def sign_in(resource_or_scope, *args)
resource = args.last || resource_or_scope
- if resource.with_authy_authentication?(request)
+ if resource.respond_to?(:with_authy_authentication?) && resource.with_authy_authentication?(request)
# Do nothing. Because we need verify the 2FA
true
else
super
end
end
-end
\ No newline at end of file
+end