Skip to content

Commit

Permalink
Use the new method for getting secret_key_base
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Jan 18, 2024
1 parent a36d8fb commit 39da9f8
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions app/controllers/concerns/blacklight/token_based_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,7 @@ def export_secret_token

def secret_key_generator
@secret_key_generator ||= begin
app = Rails.application

secret_key_base = if app.respond_to?(:credentials)
# Rails 5.2+
app.credentials.secret_key_base
else
# Rails <= 5.1
app.secrets.secret_key_base
end
ActiveSupport::KeyGenerator.new(secret_key_base)
ActiveSupport::KeyGenerator.new(Rails.application.secret_key_base)
end
end

Expand Down

0 comments on commit 39da9f8

Please sign in to comment.