Sha256: ca3a7f3c260eeb8e0f482a57d886e171cc89447c9db5e8a457d5ea5b7b200b73
Contents?: true
Size: 467 Bytes
Versions: 4
Compression:
Stored size: 467 Bytes
Contents
# frozen_string_literal: true require 'sinatra/base' module ZohoHub class OauthCallbackServer < Sinatra::Base enable :logging CALLBACK_PATH = 'oauth2callback' get "/#{CALLBACK_PATH}" do grant_token = params[:code] # This will trigger a post request to get both the token and the refresh token @variables = ZohoHub::Auth.get_token(grant_token) puts "Variables: #{@variables.inspect}" erb :variables end end end
Version data entries
4 entries across 4 versions & 1 rubygems