Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

adding error when key is missing #260

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/knock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ module Knock

# Configure the key used to sign tokens.
mattr_accessor :token_secret_signature_key
self.token_secret_signature_key = -> { Rails.application.secrets.secret_key_base }
begin
self.token_secret_signature_key = -> { Rails.application.secrets.secret_key_base }
rescue
raise "Knock secret signature key can't be empty"
end

# Configure the public key used to decode tokens, when required.
mattr_accessor :token_public_key
Expand Down