All checks were successful
Build App / build-macos (push) Successful in 2m29s
Build App / build-windows (push) Successful in 3m56s
Build App / build-linux (push) Successful in 4m42s
Build Container / build-container (push) Successful in 54s
Build App / sync-to-github (push) Successful in 10s
SSO login was broken in containers due to three issues: the sso_session indirection format not being resolved by Claude Code's AWS SDK, SSO detection only checking sso_start_url (missing sso_session), and the OAuth callback port not being accessible from inside the container. This fix runs SSO login on the host OS (where the browser and ports work natively) by having the container emit a marker that the Tauri app detects in terminal output, triggering host-side `aws sso login`. The entrypoint also inlines sso_session properties into profile sections and injects awsAuthRefresh into Claude Code config for mid-session refresh. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
974 B
Bash
Executable File
34 lines
974 B
Bash
Executable File
#!/bin/bash
|
|
# Signal Triple-C to perform host-side AWS SSO login, then sync the result.
|
|
CACHE_DIR="$HOME/.aws/sso/cache"
|
|
HOST_CACHE="/tmp/.host-aws/sso/cache"
|
|
MARKER="/tmp/.sso-refresh-marker"
|
|
|
|
touch "$MARKER"
|
|
|
|
# Emit marker for Triple-C app to detect in terminal output
|
|
echo "###TRIPLE_C_SSO_REFRESH###"
|
|
echo "Waiting for SSO login to complete on host..."
|
|
|
|
TIMEOUT=120
|
|
ELAPSED=0
|
|
while [ $ELAPSED -lt $TIMEOUT ]; do
|
|
if [ -d "$HOST_CACHE" ]; then
|
|
NEW=$(find "$HOST_CACHE" -name "*.json" -newer "$MARKER" 2>/dev/null | head -1)
|
|
if [ -n "$NEW" ]; then
|
|
mkdir -p "$CACHE_DIR"
|
|
cp -f "$HOST_CACHE"/*.json "$CACHE_DIR/" 2>/dev/null
|
|
chown -R "$(whoami)" "$CACHE_DIR"
|
|
echo "AWS SSO credentials refreshed successfully."
|
|
rm -f "$MARKER"
|
|
exit 0
|
|
fi
|
|
fi
|
|
sleep 2
|
|
ELAPSED=$((ELAPSED + 2))
|
|
done
|
|
|
|
echo "SSO refresh timed out (${TIMEOUT}s). Please try again."
|
|
rm -f "$MARKER"
|
|
exit 1
|