Skip to content

Fix OmniAuth OAuth2Generic strategy not loading

Stan Hu requested to merge sh-fix-omniauth-generic-strategy into master

In, 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.


Edited by Stan Hu

Merge request reports