0
0
Fork 0

Merge remote-tracking branch 'origin/master' into merge-upstream

Conflicts:
	app/controllers/settings/two_factor_authentication/confirmations_controller.rb
This commit is contained in:
David Yip 2018-01-21 13:36:10 -06:00
commit 1253279feb
No known key found for this signature in database
GPG key ID: 7DA0036508FCC0CC
9 changed files with 67 additions and 9 deletions

View file

@ -3,6 +3,8 @@
module Settings
module TwoFactorAuthentication
class ConfirmationsController < BaseController
before_action :ensure_otp_secret
def new
prepare_two_factor_form
end
@ -34,6 +36,10 @@ module Settings
@provision_url = current_user.otp_provisioning_uri(current_user.email, issuer: Rails.configuration.x.local_domain)
@qrcode = RQRCode::QRCode.new(@provision_url)
end
def ensure_otp_secret
redirect_to settings_two_factor_authentication_path unless current_user.otp_secret
end
end
end
end