BUGFIX: When running under a forking server (apache or unicorn) openid strategy was caching a redis connection from the parent, this made "login with google" only work some of the time.
This commit is contained in:
parent
83d8bcdc27
commit
bec463564f
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue