FIX: Access API key site setting at runtime
Accessing site settings on boot meant changes were not reflected until the server was restarted, and the plugin was not multi-site compatible. This commit uses the same convention used in other auth providers to access the site setting during the web request.
This commit is contained in:
parent
50d64381ed
commit
de60de90c2
|
@ -8,6 +8,9 @@ class Auth::SteamAuthenticator < ::Auth::ManagedAuthenticator
|
|||
end
|
||||
|
||||
def register_middleware(omniauth)
|
||||
omniauth.provider :steam, SiteSetting.steam_web_api_key
|
||||
omniauth.provider :steam, setup: lambda { |env|
|
||||
strategy = env["omniauth.strategy"]
|
||||
strategy.options[:api_key] = SiteSetting.steam_web_api_key
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue