mirror of
https://github.com/discourse/discourse.git
synced 2025-02-19 22:54:00 +08:00
FIX: skip jwt encoding for auth
This commit is contained in:
parent
eb593f568f
commit
0ef141b2c3
|
@ -31,12 +31,15 @@ class Auth::GoogleOAuth2Authenticator < Auth::Authenticator
|
||||||
end
|
end
|
||||||
|
|
||||||
def register_middleware(omniauth)
|
def register_middleware(omniauth)
|
||||||
|
# jwt encoding is causing auth to fail in quite a few conditions
|
||||||
|
# skipping
|
||||||
omniauth.provider :google_oauth2,
|
omniauth.provider :google_oauth2,
|
||||||
:setup => lambda { |env|
|
:setup => lambda { |env|
|
||||||
strategy = env["omniauth.strategy"]
|
strategy = env["omniauth.strategy"]
|
||||||
strategy.options[:client_id] = SiteSetting.google_oauth2_client_id
|
strategy.options[:client_id] = SiteSetting.google_oauth2_client_id
|
||||||
strategy.options[:client_secret] = SiteSetting.google_oauth2_client_secret
|
strategy.options[:client_secret] = SiteSetting.google_oauth2_client_secret
|
||||||
}
|
},
|
||||||
|
skip_jwt: true
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
Loading…
Reference in New Issue
Block a user