Commit Graph

7 Commits

Author SHA1 Message Date
Stan Hu bf8f4c135a Fix OmniAuth OAuth2Generic strategy not loading
In https://github.com/rails/rails/commit/83b767ce, Rails 5.1 removed
support for using a String to specify a middleware. When the
strategy_class argument is passed from the GitLab YAML config to Devise,
Devise passes the string value straight through to Rails, and GitLab
would crash with a NoMethodError inside ActionDispatch::MiddlewareStack.

To make this OmniAuth strategy work again, we normalize the arguments by
converting the strategy_class value into an actual Class.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/62216
2019-05-23 12:17:56 -07:00
gfyoung c858f70d07 Enable frozen string for lib/gitlab/*.rb 2018-10-22 07:00:50 +00:00
Lin Jen-Shin d0afab482f Disable SAML if OmniAuth is disabled
We also try to unify the way we setup OmniAuth, and how we check
if it's enabled or not.
2018-07-20 18:54:46 +08:00
Lin Jen-Shin 3b8b38fb0f If `omniauth_auto_sign_in_with_provider` is set,
it also means we're using omniauth, so we need to set it up.
2018-07-02 16:46:24 +08:00
James Edwards-Jones 60b480fe81 OmniauthInitializer refactoring 2018-03-22 00:24:53 +00:00
James Edwards-Jones 97cf5d737d Omniauth callbacks moved to methods 2018-03-20 17:39:53 +00:00
James Edwards-Jones da2191afa0 OmniauthInitializer created to improve devise.rb
This should simplify refactoring and allow testing
2018-03-20 17:39:52 +00:00