diff --git a/README.md b/README.md index dabdea41..2a4e798e 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,11 @@ ### Initial Setup -In a Rails environment, require the gem in your Gemfile: +For Rails 5+ require the gem file and point the src to this github repo: + + gem 'two_factor_authentication', github: "Houdini/two_factor_authentication" + +In other Rails environments, require the gem in your Gemfile: gem 'two_factor_authentication' diff --git a/lib/two_factor_authentication/hooks/two_factor_authenticatable.rb b/lib/two_factor_authentication/hooks/two_factor_authenticatable.rb index 159ae144..e854e29b 100644 --- a/lib/two_factor_authentication/hooks/two_factor_authenticatable.rb +++ b/lib/two_factor_authentication/hooks/two_factor_authenticatable.rb @@ -7,7 +7,7 @@ if user.respond_to?(:need_two_factor_authentication?) && !bypass_by_cookie if auth.session(options[:scope])[TwoFactorAuthentication::NEED_AUTHENTICATION] = user.need_two_factor_authentication?(auth.request) - user.send_new_otp unless user.totp_enabled? + user.send_new_otp end end end