Added redirect to loop for gitea SSO

This commit is contained in:
root 2024-11-26 14:51:56 +00:00
parent 99ed16f870
commit 39bbf1d97d

View File

@ -350,9 +350,8 @@ EOF
run_command "/federated/bin/start gitea"
GITEA_RETRY="0"
until docker exec --user 1000 gitea gitea admin auth add-oauth --name "Authelia" --provider "openidConnect" --key "gitea" --secret "$GITEA_CLIENT_SECRET" --auto-discover-url "https://authelia.$DOMAIN/.well-known/openid-configuration" --skip-local-2fa "true" --scopes "openid email profile" --group-claim-name "groups" --admin-group "admin" --restricted-group "guest"; do
until docker exec --user 1000 gitea gitea admin auth add-oauth --name "Authelia" --provider "openidConnect" --key "gitea" --secret "$GITEA_CLIENT_SECRET" --auto-discover-url "https://authelia.$DOMAIN/.well-known/openid-configuration" --skip-local-2fa "true" --scopes "openid email profile" --group-claim-name "groups" --admin-group "admin" --restricted-group "guest" &>/dev/null; do
[[ "$GITEA_RETRY" -eq 60 ]] && echo "ERROR - Can't connect gitea add-oauth to authelia" && break
echo "Retrying.."
sleep 1
((GITEA_RETRY++))
done