https://github.com/intridea/omniauth/blob/master/lib/omniauth/strategy.rb#L292# The setup phase looks for the `:setup` option to exist and,# if it is, will call either the Rack endpoint supplied to the# `:setup` option or it will call out to the setup path of the# underlying application. This will default to `/auth/:provider/setup`.defsetup_phaseifoptions[:setup].respond_to?(:call)log:info,"Setup endpoint detected, running now."options[:setup].call(env)elsifoptions.setup?log:info,"Calling through to underlying application for setup."setup_env=env.merge('PATH_INFO'=>setup_path,'REQUEST_METHOD'=>'GET')call_app!(setup_env)endend