class Google::Auth::WebUserAuthorizer::CallbackApp
@see Google::Auth::WebUserAuthorizer
end
Google::Auth::WebUserAuthorizer::CallbackApp.call(env)
get(‘/oauth2callback’) do
Or in a classic Sinatra app:
end
run Google::Auth::WebUserAuthorizer::CallbackApp
map ‘/oauth2callback’ do
With Rackup, add to config.ru:
via: :all
to: Google::Auth::WebUserAuthorizer::CallbackApp,
match ‘/oauth2callback’,
To configure in Rails, add to routes.rb:
Small Rack app which acts as the default callback handler for the app.
def self.call env
-
(Array)
-
Parameters:
-
env
(Hash
) --
def self.call env request = Rack::Request.new env return_url = WebUserAuthorizer.handle_auth_callback_deferred request if return_url [REDIR_STATUS, { LOCATION_HEADER => return_url }, []] else [ERROR_STATUS, {}, ["No return URL is present in the request."]] end end
def call env
def call env self.class.call env end