Fruitful™
🦍

FAA.ZONE™

Minutes of Meeting: Xero Integration Setup

📅

Meeting Overview

Date: June 22, 2025

Attendees: Gemini (AI), Heyns (User)

Purpose: Establish and troubleshoot Xero accounting integration for the Seedwave Admin Panel.

Key Setup & Decisions

  • Xero Developer Account and "FAA Vault Connector" app configured.
  • Seedwave Admin Panel deployed to Git Pages: https://seedwave.faa.zone/admin_panel_xero.html
  • Firebase Project "FAA Nexus" created and configured for authentication and Firestore.
  • Firebase Anonymous Authentication enabled.
  • Cloud Firestore database provisioned with security rules for user-specific Xero token storage.
  • Google Analytics 4 configured with Measurement ID `G-S4ZB8QV782`.
🔑

Credentials & Important URLs

  • Xero Developer Portal: https://developer.xero.com/
  • Firebase Console (FAA Nexus): https://console.firebase.google.com/project/faa-nexus/overview
  • Xero Central (Support): https://central.xero.com/
  • Xero Client ID: `81B3573D453040508996432C5DAD565B`
  • Xero Client Secret: `FIaJGmsaCcKR3Z8kWxPnQd04EhYy6_bImPmoitQDP1U6Smaq`
  • Xero Redirect URI (and App URL in Xero Dev Portal): `https://seedwave.faa.zone/admin_panel_xero.html`
  • Firebase `firebaseConfig` (from console):
    {
        "apiKey": "AIzaSyCR3mbgoiiCkRyaAm5BSWBWBFwut0MDCW8",
        "authDomain": "faa-nexus.firebaseapp.com",
        "projectId": "faa-nexus",
        "storageBucket": "faa-nexus.firebasestorage.app",
        "messagingSenderId": "459816542686",
        "appId": "1:459816542686:web:7fc0596fb70e2e6b753d4f",
        "measurementId": "G-S4ZB8QV782"
    }
  • Google Analytics 4 Measurement ID: `G-S4ZB8QV782`
  • Xero Organization for testing: Fruitful Shops (Pty) Ltd
⚠️

Issues Encountered & Troubleshooting

  • **Initial Javascript Execution Issues:** `Uncaught ReferenceError: loadContent is not defined` resolved by ensuring `window.` prefixes and complete code deployment.
  • **Firebase Authentication Errors:** `auth/invalid-api-key`, `auth/network-request-failed`, `auth/configuration-not-found` resolved by:
    • Adding correct Firebase `firebaseConfig` to HTML.
    • Enabling Anonymous Authentication in Firebase Console.
    • Extensively updating Content Security Policy (CSP) for `script-src`, `connect-src`, and `frame-src` to allow all necessary Firebase/Google/Xero domains.
    • Ensuring Firebase SDK versions (`11.9.1`) match the console snippets.
  • **Firestore Connection/Permission Errors:** `400 (Bad Request)`, `Client is offline`, `Could not reach backend` resolved by:
    • Creating Cloud Firestore database in Firebase Console.
    • Configuring Firestore Security Rules to allow authenticated users read/write to their specific `xeroTokens` path.
  • **Persistent Xero OAuth Rejection:** `Sorry, something went wrong` and `iconLoader.js:2 Uncaught TypeError: Cannot read properties of null (reading '1')` errors.
    • Extensive verification confirms **live code (Client ID, Secret, Redirect URI) is 100% correct.**
    • Problem points to **Xero's internal system/registration for "FAA Vault Connector" app.**
    • **Case raised with Xero Support:** CX0016588829 ([email protected]).
➡️

Next Steps

Await response and guidance from Xero Support regarding case **CX0016588829** to resolve the OAuth authorization rejection.

Note on Webhooks: Webhook integration requires a backend server to receive and process payloads; this will be a future step once the primary OAuth connection is stable.

© 2025 FAA.ZONE™

Xero Integration Setup Document v1.0