From 91ba80466d3fc6a20b2e914ff80e2a8b3ef7c226 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 14 Aug 2022 15:55:18 -0500 Subject: [PATCH] Set better default scope for keycloak --- config/config.exs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config/config.exs b/config/config.exs index 9aefa13be2..c07c5243a6 100644 --- a/config/config.exs +++ b/config/config.exs @@ -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,