Retrospring/app/helpers/feedback_helper.rb

14 lines
323 B
Ruby
Raw Normal View History

2022-01-21 22:39:33 -08:00
module FeedbackHelper
def canny_token
return if current_user.nil?
userData = {
avatarURL: current_user.profile_picture.url(:large),
name: current_user.screen_name,
id: current_user.id,
email: current_user.email
}
JWT.encode(userData, APP_CONFIG.dig("canny", "sso"))
end
end