Set better default scope for keycloak

This commit is contained in:
Alex Gleason 2022-08-14 15:55:18 -05:00
parent a9550ac88d
commit 91ba80466d
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

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,