mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08: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…
Add table
Add a link
Reference in a new issue