about summary refs log tree commit diff
path: root/app/controllers/auth
diff options
context:
space:
mode:
authorStarfall <admin@plural.cafe>2020-05-15 18:30:58 -0500
committerStarfall <admin@plural.cafe>2020-05-15 18:30:58 -0500
commit3f6370500cd8bf04fab9c9d8f3099271126a3097 (patch)
tree7215e9562c06435f9e6464fee2aa0185dd108a34 /app/controllers/auth
parentca3af6c5b00be851e2ced9112429cfc1baa79529 (diff)
parentb7e178d2e4102bdaa1ea41dfd8ed50093cf3f60a (diff)
Update to Mastodon 3.1.4 / Merge branch 'glitch'
Diffstat (limited to 'app/controllers/auth')
-rw-r--r--app/controllers/auth/sessions_controller.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/auth/sessions_controller.rb b/app/controllers/auth/sessions_controller.rb
index eac9dde6f..c36561b86 100644
--- a/app/controllers/auth/sessions_controller.rb
+++ b/app/controllers/auth/sessions_controller.rb
@@ -113,6 +113,13 @@ class Auth::SessionsController < Devise::SessionsController
     render :two_factor
   end
 
+  def require_no_authentication
+    super
+    # Delete flash message that isn't entirely useful and may be confusing in
+    # most cases because /web doesn't display/clear flash messages.
+    flash.delete(:alert) if flash[:alert] == I18n.t('devise.failure.already_authenticated')
+  end
+
   private
 
   def set_pack