diff --git a/lib/auth/open_id_authenticator.rb b/lib/auth/open_id_authenticator.rb index 77dec7b7e46..435a313ce56 100644 --- a/lib/auth/open_id_authenticator.rb +++ b/lib/auth/open_id_authenticator.rb @@ -50,7 +50,10 @@ class Auth::OpenIdAuthenticator < Auth::Authenticator def register_middleware(omniauth) omniauth.provider :open_id, - :store => OpenID::Store::Redis.new($redis), + :setup => lambda { |env| + strategy = env["omniauth.strategy"] + strategy.options[:store] = OpenID::Store::Redis.new($redis) + }, :name => name, :identifier => identifier, :require => "omniauth-openid"