Skip to content

Commit 6528c00

Browse files
committed
fix: handle authentication failure in sessions controller
1 parent f250d31 commit 6528c00

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/controllers/sessions_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ def create
2626
reset_session
2727
session[:user_id] = user.id
2828
redirect_to root_path, notice: "Signed in with Slack"
29-
nil
29+
else
30+
redirect_to root_path, alert: "Authentication failed or user already signed in"
3031
end
3132
end
3233

0 commit comments

Comments
 (0)