Skip to content

Commit

Permalink
fix cable connection for jwt-signins
Browse files Browse the repository at this point in the history
Co-authored-by: Joakim Kolsjö <[email protected]>
  • Loading branch information
p-wall and joakimk committed Jun 18, 2024
1 parent b1c89c2 commit 829400b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/controllers/web_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down

0 comments on commit 829400b

Please sign in to comment.