mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 14:29:53 +01:00
16 lines
370 B
Ruby
16 lines
370 B
Ruby
# frozen_string_literal: true
|
|
|
|
module FeedbackHelper
|
|
def canny_token
|
|
return if current_user.nil?
|
|
|
|
user_data = {
|
|
avatarURL: current_user.profile_picture.url(:large),
|
|
name: current_user.screen_name,
|
|
id: current_user.id,
|
|
email: current_user.email,
|
|
}
|
|
|
|
JWT.encode(user_data, APP_CONFIG.dig("canny", "sso"))
|
|
end
|
|
end
|