Skip to content

Commit

Permalink
fix: generated warden initializer should be activated when anycable-r…
Browse files Browse the repository at this point in the history
…ails is available
  • Loading branch information
palkan committed Mar 8, 2024
1 parent a7302d8 commit 2471883
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# Devise current user via `env["warden"].user`.
#
# See <%= DOCS_ROOT %>/ruby/authentication
AnyCable::Rails::Rack.middleware.use Warden::Manager do |config|
Devise.warden_config = config
#
# NOTE: This is only needed in environments where you use AnyCable.
if defined?(AnyCable::Rails)
AnyCable::Rails::Rack.middleware.use Warden::Manager do |config|
Devise.warden_config = config
end
end

0 comments on commit 2471883

Please sign in to comment.