metamaps--metamaps/config/initializers/uservoice.rb
2016-09-24 11:00:46 +08:00

8 lines
361 B
Ruby

# frozen_string_literal: true
require 'uservoice-ruby'
def current_sso_token
@current_sso_token ||= UserVoice.generate_sso_token('metamapscc', ENV['SSO_KEY'], {
email: current_user.email
}, 300) # Default expiry time is 5 minutes = 300 seconds
end