From 213337cf3e3e1435104cc855dd6c510fe25ba39a Mon Sep 17 00:00:00 2001 From: root Date: Fri, 22 Nov 2024 15:24:40 +0000 Subject: [PATCH] Fixed endpoint sessions for SSO --- lib/bookstack.sh | 2 +- lib/espocrm.sh | 2 +- lib/nextcloud.sh | 2 +- lib/wordpress.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bookstack.sh b/lib/bookstack.sh index 5758849..e3ff68c 100644 --- a/lib/bookstack.sh +++ b/lib/bookstack.sh @@ -240,7 +240,7 @@ OIDC_CLIENT_SECRET=$BOOKSTACK_CLIENT_SECRET OIDC_ISSUER=https://authelia.$DOMAIN OIDC_ISSUER_DISCOVER=true OIDC_EXTERNAL_ID_CLAIM=email -OIDC_END_SESSION_ENDPOINT=https://authelia.$DOMAIN/logout +OIDC_END_SESSION_ENDPOINT=https://authelia.$DOMAIN/logout?rd=https://dashboard.$DOMAIN #APP_DEBUG=true #OIDC_DUMP_USER_DETAILS=true EOF diff --git a/lib/espocrm.sh b/lib/espocrm.sh index 4384a4c..78858e0 100644 --- a/lib/espocrm.sh +++ b/lib/espocrm.sh @@ -248,7 +248,7 @@ ESPOCRM_CONFIG_OIDC_CLIENT_SECRET=$ESPOCRM_CLIENT_SECRET ESPOCRM_CONFIG_OIDC_AUTHORIZATION_ENDPOINT=https://authelia.$DOMAIN/api/oidc/authorization ESPOCRM_CONFIG_OIDC_TOKEN_ENDPOINT=https://authelia.$DOMAIN/api/oidc/token ESPOCRM_CONFIG_OIDC_JWKS_ENDPOINT=https://authelia.$DOMAIN/jwks.json -ESPOCRM_CONFIG_OIDC_LOGOUT_URL=https://authelia.$DOMAIN/logout +ESPOCRM_CONFIG_OIDC_LOGOUT_URL=https://authelia.$DOMAIN/logout?rd=https://dashboard.$DOMAIN" ESPOCRM_CONFIG_OIDC_CREATE_USER=true ESPOCRM_CONFIG_OIDC_ALLOW_ADMIN_USER=true ESPOCRM_CONFIG_OIDC_SYNC=false diff --git a/lib/nextcloud.sh b/lib/nextcloud.sh index ef5aa12..015388a 100644 --- a/lib/nextcloud.sh +++ b/lib/nextcloud.sh @@ -383,7 +383,7 @@ EOF run_command "docker exec -u 33 nextcloud /var/www/html/occ config:system:set allow_local_remote_servers --value=true" run_command "docker exec -u 33 nextcloud /var/www/html/occ app:enable user_oidc" run_command "docker exec -u 33 nextcloud /var/www/html/occ config:system:set --value=true --type=boolean user_oidc use_pkce" - run_command "docker exec -u 33 nextcloud /var/www/html/occ user_oidc:provider Authelia --clientid="nextcloud" --clientsecret="$NEXTCLOUD_CLIENT_SECRET" --discoveryuri="https://authelia.$DOMAIN/.well-known/openid-configuration" --mapping-uid=name --endsessionendpointuri=https://authelia.$DOMAIN/logout" + run_command "docker exec -u 33 nextcloud /var/www/html/occ user_oidc:provider Authelia --clientid="nextcloud" --clientsecret="$NEXTCLOUD_CLIENT_SECRET" --discoveryuri="https://authelia.$DOMAIN/.well-known/openid-configuration" --mapping-uid=name --endsessionendpointuri=https://authelia.$DOMAIN/logout?rd=https://dashboard.$DOMAIN" run_command "/federated/bin/stop nextcloud" run_command "/federated/bin/start nextcloud" diff --git a/lib/wordpress.sh b/lib/wordpress.sh index 6e92b14..0a5afc4 100644 --- a/lib/wordpress.sh +++ b/lib/wordpress.sh @@ -246,7 +246,7 @@ define( 'OIDC_CLIENT_SECRET', '$WORDPRESS_CLIENT_SECRET' );\n\ define( 'OIDC_ENDPOINT_LOGIN_URL', 'https://authelia.$DOMAIN/api/oidc/authorization' );\n\ define( 'OIDC_ENDPOINT_USERINFO_URL', 'https://authelia.$DOMAIN/api/oidc/userinfo' );\n\ define( 'OIDC_ENDPOINT_TOKEN_URL', 'https://authelia.$DOMAIN/api/oidc/token' );\n\ -define( 'OIDC_ENDPOINT_LOGOUT_URL', 'https://authelia.$DOMAIN/logout' );\n\ +define( 'OIDC_ENDPOINT_LOGOUT_URL', 'https://authelia.$DOMAIN/logout?rd=https://dashboard.$DOMAIN' );\n\ define( 'OIDC_CLIENT_SCOPE', 'openid profile email groups' );\n\ define( 'OIDC_LOGIN_TYPE', 'button' );\n\ define( 'OIDC_CREATE_IF_DOES_NOT_EXIST', '1' );\n\