Welcome to mirror list, hosted at ThFree Co, Russian Federation.

100_patch_omniauth_oauth2.rb « initializers_before_autoloader « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 760fcba59351dea16619b6eebc820b2b8807b101 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module OmniAuth
  module Strategies
    class OAuth2
      alias_method :original_callback_phase, :callback_phase

      # Monkey patch until PR is merged and released upstream
      # https://github.com/omniauth/omniauth-oauth2/pull/129
      def callback_phase
        original_callback_phase
      rescue ::Faraday::TimeoutError, ::Faraday::ConnectionFailed => e
        fail!(:timeout, e)
      end
    end
  end
end