summaryrefslogtreecommitdiff
path: root/app/controllers/otp_challenges_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/otp_challenges_controller.rb')
-rw-r--r--app/controllers/otp_challenges_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/otp_challenges_controller.rb b/app/controllers/otp_challenges_controller.rb
index e31c36ca..eeaeac20 100644
--- a/app/controllers/otp_challenges_controller.rb
+++ b/app/controllers/otp_challenges_controller.rb
@@ -19,7 +19,7 @@ class OtpChallengesController < ApplicationController
19 session[:otp_attempts] = session[:otp_attempts].to_i + 1 19 session[:otp_attempts] = session[:otp_attempts].to_i + 1
20 if session[:otp_attempts] > MAX_ATTEMPTS 20 if session[:otp_attempts] > MAX_ATTEMPTS
21 clear_pending 21 clear_pending
22 flash[:error] = "Too many attempts -- log in again." 22 flash[:error] = t("flash.otp.too_many_attempts")
23 return redirect_to login_path 23 return redirect_to login_path
24 end 24 end
25 25
@@ -28,10 +28,10 @@ class OtpChallengesController < ApplicationController
28 reset_session 28 reset_session
29 self.current_user = user 29 self.current_user = user
30 session[:logged_in_at] = Time.now.to_i 30 session[:logged_in_at] = Time.now.to_i
31 flash[:notice] = "Logged in successfully" 31 flash[:notice] = t("flash.common.logged_in")
32 redirect_to safe_return_to(return_to, :default => admin_path) 32 redirect_to safe_return_to(return_to, :default => admin_path)
33 else 33 else
34 flash.now[:error] = "That code did not match." 34 flash.now[:error] = t("flash.otp.code_mismatch")
35 render :new 35 render :new
36 end 36 end
37 end 37 end