Skip to content

Commit

Permalink
fix: Make secret_key and publishable_key required in authentication c…
Browse files Browse the repository at this point in the history
…ontext
  • Loading branch information
dimkl committed Apr 2, 2024
1 parent 62d9c49 commit 0d4d8c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/clerk/authenticate_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ def initialize(request, config)
# The following properties are part of the props supported in all the AuthenticateContext
# objects across all of our SDKs (eg JS, Go)
def secret_key
raise Errors::Configuration, "Clerk secret key is not set" if @config.api_key.to_s.empty?
@config.api_key.to_s
end

def publishable_key
raise Errors::Configuration, "Clerk publishable key is not set" if @config.publishable_key.to_s.to_s.empty?
@config.publishable_key.to_s
end

Expand Down
3 changes: 3 additions & 0 deletions lib/clerk/errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ class Fatal < Base

class Authentication < Base
end

class Configuration < StandardError
end
end
end

0 comments on commit 0d4d8c6

Please sign in to comment.