Setting full names and assigning roles via SSO
I've successfully configured mobilizon to allow logins from keycloak, although it appears that only the email is used. The user must type their desired username and full name, and none of the roles from the OAuth identity are applied. The additions to the config.exs
are based on the ones in the Mobilizon - Administration - Configure - Auth - OAuth documentation (slightly modified to pass some variables through the environment):
config :ueberauth,
Ueberauth,
providers: [
keycloak: {Ueberauth.Strategy.Keycloak, [default_scope: "openid"]}
]
config :mobilizon, :auth,
oauth_consumer_strategies: [
{:keycloak, "#{keycloak_hostname}"}
]
config :ueberauth, Ueberauth.Strategy.Keycloak.OAuth,
client_id: "mobilizon",
client_secret: keycloak_secret,
site: keycloak_url,
authorize_url: "#{keycloak_url}/protocol/openid-connect/auth",
token_url: "#{keycloak_url}/protocol/openid-connect/token",
userinfo_url: "#{keycloak_url}/protocol/openid-connect/userinfo",
token_method: :post