mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 14:42:32 -05:00
use Rails.application.secret_key_base
This commit is contained in:
1 parent
01535f1afc
commit
48d41833f1
2 files changed
+3
-3
No files matched your search
@@ -4,10 +4,10 @@ module JsonWebToken
|
|||||||
module_function
|
module_function
|
||||||
|
|
||||||
def encode(payload)
|
def encode(payload)
|
||||||
JWT.encode(payload, Rails.application.credentials.secret_key_base)
|
JWT.encode(payload, Rails.application.secret_key_base)
|
||||||
end
|
end
|
||||||
|
|
||||||
def decode(token)
|
def decode(token)
|
||||||
JWT.decode(token, Rails.application.credentials.secret_key_base)[0]
|
JWT.decode(token, Rails.application.secret_key_base)[0]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -21,7 +21,7 @@ module SubmissionEvents
|
|||||||
|
|
||||||
def build_tracking_param(submitter, event_type = 'click_email')
|
def build_tracking_param(submitter, event_type = 'click_email')
|
||||||
Base64.urlsafe_encode64(
|
Base64.urlsafe_encode64(
|
||||||
[submitter.slug, event_type, Rails.application.credentials.secret_key_base].join(':')
|
[submitter.slug, event_type, Rails.application.secret_key_base].join(':')
|
||||||
).first(TRACKING_PARAM_LENGTH)
|
).first(TRACKING_PARAM_LENGTH)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user