Merge branch 'keycloak-default-scope' into 'develop'

Set better default scope for keycloak

See merge request soapbox-pub/soapbox-be!159
This commit is contained in:
Alex Gleason 2022-08-14 22:18:24 +00:00
commit 02ffc908f6

View file

@ -629,7 +629,14 @@
for strategy <- oauth_consumer_strategies do
strategy_module_name = "Elixir.Ueberauth.Strategy.#{String.capitalize(strategy)}"
strategy_module = String.to_atom(strategy_module_name)
{String.to_atom(strategy), {strategy_module, [callback_params: ["state"]]}}
params =
case strategy do
"keycloak" -> [uid_field: :email, default_scope: "openid profile"]
_ -> [callback_params: ["state"]]
end
{String.to_atom(strategy), {strategy_module, params}}
end
config :ueberauth,