lib/omniauth/strategy.rb
def call!(env) # rubocop:disable CyclomaticComplexity, PerceivedComplexity
      unless env['rack.session']
        error = OmniAuth::NoSessionError.new('You must provide a session to use OmniAuth.')
        raise(error)
      end

      @env = env
      @env['omniauth.strategy'] = self if on_auth_path?

      return mock_call!(env) if OmniAuth.config.test_mode
      return options_call if on_auth_path? && options_request?
      return request_call if on_request_path? && OmniAuth.config.allowed_request_methods.include?(request.request_method.downcase.to_sym)
      return callback_call if on_callback_path?
      return other_phase if respond_to?(:other_phase)

      @app.call(env)
    end
def call!(env) # rubocop:disable CyclomaticComplexity, PerceivedComplexity
      unless env['rack.session']
        error = OmniAuth::NoSessionError.new('You must provide a session to use OmniAuth.')
        raise(error)
      end

      @env = env
      @env['omniauth.strategy'] = self if on_auth_path?

      return mock_call!(env) if OmniAuth.config.test_mode
      return options_call if on_auth_path? && options_request?
      return request_call if on_request_path? && OmniAuth.config.allowed_request_methods.include?(request.request_method.downcase.to_sym)
      return callback_call if on_callback_path?
      return other_phase if respond_to?(:other_phase)

      @app.call(env)
    end
def call! ( env ) # rubocop:disable CyclomaticComplexity, PerceivedComplexity unless env [ 'rack.session' ] error = OmniAuth :: NoSessionError . new ( 'You must provide a session to use OmniAuth.' ) raise ( error ) end @env = env @env [ 'omniauth.strategy' ] = self if on_auth_path? return mock_call! ( env ) if OmniAuth . config . test_mode return options_call if on_auth_path? && options_request? return request_call if on_request_path? && OmniAuth . config . allowed_request_methods . include? ( request . request_method . downcase . to_sym ) return callback_call if on_callback_path? return other_phase if respond_to? ( :other_phase ) @app . call ( env ) end
The logic for dispatching any additional actions that need
 to be taken. For instance, calling the request phase if
 the request path is recognized.

 @param env [Hash] The Rack environment.
The logic for dispatching any additional actions that need to be taken . For instance calling the request phase if the request path is recognized .