diff --git a/.env.sample b/.env.sample index 6389989..a5c41a7 100644 --- a/.env.sample +++ b/.env.sample @@ -11,11 +11,9 @@ ADMIN_EMAIL=rocketchat@example.com # OAuth with Keycloak #COMPOSE_FILE="compose.yml:compose.oauth.yml" -#Accounts_OAuth_Custom-Keycloak-url="https://id.example.com/auth" -#Accounts_OAuth_Custom-Keycloak-token_path="/realms/realmname/protocol/openid-connect/token" -#Accounts_OAuth_Custom-Keycloak-identity_path="/realms/realmname/protocol/openid-connect/userinfo" -#Accounts_OAuth_Custom-Keycloak-authorize_path="/realms/realmname/protocol/openid-connect/auth" -#Accounts_OAuth_Custom-Keycloak-id="rocketchat" +#KEYCLOAK_DOMAIN=id.example.com +#KEYCLOAK_REALM=myrealm +#KEYCLOAK_CLIENT=foobar #SECRET_OAUTH_KEY_VERSION=v1 diff --git a/compose.oauth.yml b/compose.oauth.yml index d81a37b..9f639f1 100644 --- a/compose.oauth.yml +++ b/compose.oauth.yml @@ -7,14 +7,14 @@ services: - oauth_key environment: - Accounts_OAuth_Custom-Keycloak=true - - Accounts_OAuth_Custom-Keycloak-url=${Accounts_OAuth_Custom_Keycloak_url} - - Accounts_OAuth_Custom-Keycloak-token_path=${Accounts_OAuth_Custom_Keycloak_token_path} + - Accounts_OAuth_Custom-Keycloak-url=https://${KEYCLOAK_DOMAIN}/auth + - Accounts_OAuth_Custom-Keycloak-token_path=/realms/${KEYCLOAK_REALM}/protocol/openid-connect/token - Accounts_OAuth_Custom-Keycloak-token_sent_via=Header - Accounts_OAuth_Custom-Keycloak-identity_token_sent_via=header - - Accounts_OAuth_Custom-Keycloak-identity_path=${Accounts_OAuth_Custom_Keycloak_identity_path} - - Accounts_OAuth_Custom-Keycloak-authorize_path=${Accounts_OAuth_Custom_Keycloak_authorize_path} + - Accounts_OAuth_Custom-Keycloak-identity_path=/realms/${KEYCLOAK_REALM}/protocol/openid-connect/userinfo + - Accounts_OAuth_Custom-Keycloak-authorize_path=/realms/${KEYCLOAK_REALM}/protocol/openid-connect/auth - Accounts_OAuth_Custom-Keycloak-scope=openid - - Accounts_OAuth_Custom-Keycloak-id=${Accounts_OAuth_Custom_Keycloak_id} + - Accounts_OAuth_Custom-Keycloak-id=${KEYCLOAK_CLIENT} - Accounts_OAuth_Custom-Keycloak-login_style=redirect - Accounts_OAuth_Custom-Keycloak-button_label_text=Login via Keycloak - Accounts_OAuth_Custom-Keycloak-button_label_color=#FFFFFF