Skip to content

Firebase

Read Firebase Authentication users and Firestore documents, for example while you move a Firebase app to VAIF Studio.

Connect it in the console under Integrations > Connectors. See Connectors for how connectors work and who can use them.

Create a service account in the Google Cloud console with the roles Firebase Authentication Viewer and Cloud Datastore Viewer, and create a JSON key for it. The key from Project settings > Service accounts > Generate new private key also works, but it can do much more than read.

SettingNotes
Firebase project IDRequiredFor example my-firebase-project.
Service account key (JSON)RequiredFrom Project settings > Service accounts > Generate new private key. Stored encrypted and never shown again.
TableFiltersReturns
auth_userspage_tokenFirebase Authentication users.
firestore_collectionsNoneTop-level Firestore collections.
firestore_documentscollection (required), page_tokenDocuments in one collection, fields flattened to JSON.
Terminal window
curl -s -X POST "https://api.vaif.studio/database/connector/$VAIF_PROJECT_ID/query" \
-H "Authorization: Bearer $VAIF_TOKEN" -H "Content-Type: application/json" \
-d '{"wrapperId":"firebase_fdw","table":"firestore_documents","filters":{"collection":"users"},"limit":50}'

$VAIF_TOKEN is a console access token. See Connectors for the routes.

Use a key whose roles can only read. Firestore fields come back converted to JSON.