diff --git a/lib/middleware/omniauth_bypass_middleware.rb b/lib/middleware/omniauth_bypass_middleware.rb index 92f3c97225d..4a3273071f5 100644 --- a/lib/middleware/omniauth_bypass_middleware.rb +++ b/lib/middleware/omniauth_bypass_middleware.rb @@ -28,7 +28,7 @@ class Middleware::OmniauthBypassMiddleware CSRFTokenVerifier.new.call(env) if request.request_method.downcase.to_sym != :get # Check whether the authenticator is enabled - if !Discourse.enabled_authenticators.any? { |a| a.name == env['omniauth.strategy'].name } + if !Discourse.enabled_authenticators.any? { |a| a.name.to_sym == env['omniauth.strategy'].name.to_sym } raise AuthenticatorDisabled end