fix logout

This commit is contained in:
2026-01-31 15:49:49 +01:00
parent 4bc393887b
commit 227ab744b5
4 changed files with 6 additions and 9 deletions
+1 -4
View File
@@ -9,9 +9,6 @@ class SessionsController < ApplicationController
end
def create
# Skip authentication if rate limited
return if @rate_limited
user = User.find_by(email: params[:email]&.downcase&.strip)
if user&.authenticate(params[:password])
@@ -50,6 +47,6 @@ class SessionsController < ApplicationController
current_user&.forget_me if cookies.signed[:remember_token]
reset_session
cookies.delete(:remember_token)
redirect_to root_path, notice: "You have been logged out."
redirect_to root_path, notice: "You have been logged out.", status: :see_other
end
end