Skip to content

Commit 5ce02b2

Browse files
princejosephclaude
andcommitted
Fix authorization: use secret_key_base directly (Rails.application.secrets removed in Rails 7.2)
Rails.application.secrets was deprecated in Rails 7.1 and removed in 7.2, causing a NoMethodError on every ActionCable auth request → 401 Unauthorized. Use Rails.application.secret_key_base which works across all Rails 7.x versions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0eed48c commit 5ce02b2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ruby/hyper-operation/lib/hyper-operation/transport/hyperstack.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def self.channel
153153
end
154154

155155
def self.authorization(salt, channel, session_id)
156-
secret_key = Rails.application.secrets[:secret_key_base]
156+
secret_key = Rails.application.secret_key_base
157157
Digest::SHA1.hexdigest(
158158
"salt: #{salt}, channel: #{channel}, session_id: #{session_id}, secret_key: #{secret_key}"
159159
)

0 commit comments

Comments
 (0)