Update script to receive API key from verification endpoint

The API key is now generated during email verification, not registration.

Changes:
- Extract api_key from verification response
- Save the API key to config after successful verification
- Display confirmation message when API key is received

This works with the new security flow where API keys are only issued to verified users.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-01-24 22:28:45 +01:00
parent 95b09d4e75
commit 5d824ac69c

View File

@@ -375,6 +375,15 @@ else
if echo "$VERIFY_RESPONSE" | grep -q '"verified":true'; then if echo "$VERIFY_RESPONSE" | grep -q '"verified":true'; then
echo "✅ Email verified successfully!" echo "✅ Email verified successfully!"
echo "" 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 VERIFIED=true
save_config save_config
echo "" echo ""