mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
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
1 changed files with 4 additions and 1 deletions
|
@ -50,7 +50,10 @@ class Auth::OpenIdAuthenticator < Auth::Authenticator
|
||||||
|
|
||||||
def register_middleware(omniauth)
|
def register_middleware(omniauth)
|
||||||
omniauth.provider :open_id,
|
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,
|
:name => name,
|
||||||
:identifier => identifier,
|
:identifier => identifier,
|
||||||
:require => "omniauth-openid"
|
:require => "omniauth-openid"
|
||||||
|
|
Loading…
Reference in a new issue