From 27705ee2796722391366a4ae7913c837b364962d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20West=C3=B6=C3=B6?= Date: Sat, 24 Jan 2026 23:30:43 +0100 Subject: [PATCH] Fix missing API key extraction in standalone verify flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CRITICAL BUG: When running --verify-email-code separately (not during registration), the script was not extracting the API key from the verification response. Problem: - Registration flow had API key extraction code (line 387-393) - Standalone verify flow was missing it (line 445) - API key returned by API but not saved to config Solution: - Added API key extraction to standalone verification flow - Now both flows extract and save the API key properly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- deploy-to-apps.example.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/deploy-to-apps.example.sh b/deploy-to-apps.example.sh index 3031083..f33e1b8 100644 --- a/deploy-to-apps.example.sh +++ b/deploy-to-apps.example.sh @@ -445,6 +445,15 @@ if [ "$VERIFIED" != "true" ]; then if echo "$VERIFY_RESPONSE" | grep -q '"verified":true'; then echo "✅ Email verified successfully!" echo "" + + # Extract API key from verification response + VERIFIED_API_KEY=$(echo "$VERIFY_RESPONSE" | jq -r '.api_key // ""') + if [ -n "$VERIFIED_API_KEY" ] && [ "$VERIFIED_API_KEY" != "null" ]; then + SAAC_API_KEY="$VERIFIED_API_KEY" + echo "🔑 API key received and saved" + echo "" + fi + VERIFIED=true save_config echo ""