diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-18 15:08:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-18 15:08:08 +0300 |
commit | 48650fe1bfc1e3d20ec3a5702ef4d64e9fe69912 (patch) | |
tree | 0f73ad6e03989c301b79490ddb30125c233e4eff /config/initializers_before_autoloader | |
parent | 1b9a2ce27825c02cc14b594ed5ea061fccf1d957 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/initializers_before_autoloader')
-rw-r--r-- | config/initializers_before_autoloader/100_patch_omniauth_oauth2.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/config/initializers_before_autoloader/100_patch_omniauth_oauth2.rb b/config/initializers_before_autoloader/100_patch_omniauth_oauth2.rb new file mode 100644 index 00000000000..760fcba5935 --- /dev/null +++ b/config/initializers_before_autoloader/100_patch_omniauth_oauth2.rb @@ -0,0 +1,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 |