Files
boc/quixzoom-sso-auth/deploy-universal-auth.sh
T
Bernt 1a12fb870b dev-api: add developer portal, OpenAPI spec, and Flatenbadet case study
- New /developers/ page with API docs, SDKs, pricing, use cases
- OpenAPI 3.0 spec for Orders, Missions, Photos, Analytics
- Case study: Glasskiosken i Flatenbadet — complete ROI analysis
- Updated /order/ with recurring missions and frequency dropdown
2026-07-14 15:27:33 +00:00

46 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# Deploy universal auth snippet to ALL quiXzoom sites
SITES=(
"/home/bernt/.openclaw/workspace/quixzoom-landing-fixed"
"/home/bernt/.openclaw/workspace/quixzoom-asia-pages"
"/home/bernt/.openclaw/workspace/quixzoom-market-pages"
"/home/bernt/.openclaw/workspace/landvex-site/quixzoom"
)
SNIPPET_FILE="/home/bernt/.openclaw/workspace/quixzoom-sso-auth/universal-auth-snippet.html"
echo "🚀 Deploying universal auth to ALL quiXzoom sites..."
for site in "${SITES[@]}"; do
if [ -d "$site" ]; then
echo " 📁 Processing: $(basename "$site")"
find "$site" -name "*.html" -type f | while read -r htmlfile; do
# Skip if already has universal auth
if grep -q "qz-auth-bar" "$htmlfile" 2>/dev/null; then
# Remove old auth bar first
sed -i '/<div id="qz-auth-bar"/,/<\/script>/d' "$htmlfile"
echo " 🗑️ Removed old auth bar: $(basename "$htmlfile")"
fi
# Inject new universal auth before </body>
if grep -q "</body>" "$htmlfile"; then
# Create temp file with injection
sed -i '/<\/body>/e cat '"$SNIPPET_FILE"'' "$htmlfile"
echo " ✅ Injected: $(basename "$htmlfile")"
fi
done
fi
done
echo ""
echo "✅ Universal auth deployed to all sites!"
echo ""
echo "Features:"
echo " • Silent login (auto-refresh tokens)"
echo " • Cross-domain cookie sync"
echo " • Real-time auth state"
echo " • Mobile app compatible"
echo ""