public
Created

  • Download Gist
oauth_account.rb
Ruby
1 2 3 4 5 6 7 8 9
def oauth_account
client = LinkedIn::Client.new('your-api-key', 'your-secret-key', @@config)
pin = params[:oauth_verifier]
if pin
atoken, asecret = client.authorize_from_request(session[:rtoken], session[:rsecret], pin)
LinkedinOauthSetting.create!(:asecret => asecret, :atoken => atoken, :user_id => current_user.id)
end
redirect_to "/"
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.