From 829400b46e39c78ef72e05ea6b72f69cfa3c7164 Mon Sep 17 00:00:00 2001 From: Peter Wall Date: Tue, 18 Jun 2024 14:12:55 +0200 Subject: [PATCH] fix cable connection for jwt-signins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joakim Kolsjö <13256+joakimk@users.noreply.github.com> --- app/controllers/web_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/web_controller.rb b/app/controllers/web_controller.rb index 8e6980e..80f50b9 100644 --- a/app/controllers/web_controller.rb +++ b/app/controllers/web_controller.rb @@ -15,7 +15,10 @@ def active_menu_item_name(name) def require_password # authenticated using jwt_authentication gem - return if ENV["JWT_KEY"] && session[:jwt_user_data] + if ENV["JWT_KEY"] && session[:jwt_user_data] + session[:logged_in] = true + return + end raise "Need WEB_PASSWORD configured in prod." if Rails.env.production? && !ENV["WEB_PASSWORD"]