Firebase field definitions

Firebase identity has three distinct credentials. A custom token starts the configured provider client flow. An ID token identifies that provider user. A Wallkit session token identifies a Wallkit session. Send ID tokens in firebase-token where specified and Wallkit tokens in token; neither header accepts a custom token as a substitute. The registration operation instead reads firebase_id_token from its JSON body.

Firestore fields

firestore is a dynamic, nonempty named field map. Its keys identify provider document fields/paths, not an API-defined profile schema. The operation uses collection users and document ID equal to the resource relationship’s Firebase UID.

Input formMeaning and conditions
Plain JSON valuePassed to the configured provider writer. No local closed field/type schema or provider acceptance guarantee.
{ "type": "date", "value": "2030-01-01T00:00:00Z" }When both members are non-null, value is parsed as a date and converted to a provider Timestamp. Include an explicit timezone; no default timezone guarantee.
{ "type": "string", "value": "techno" }Any structured type other than date unwraps value unchanged; string is illustrative, not a validated enum.
Object missing/null type or valueDoes not enter the structured conversion branch; passed as the original value.

Existing documents update only supplied paths; missing documents are created using submitted fields. This is not a full-document replacement. No field deletion syntax is established here. The helper falls back to email for an empty/countless map, but the operation’s presence validation requires a nonempty firestore value; use a named object rather than depending on fallback behavior.

The local user.extra.firestore stores the submitted representation plus id set to the Firebase UID. Structured date/type wrappers remain local JSON objects. With existing extra data, supplied Firestore child keys merge while untouched keys remain; an empty extra map is initialized. Other extra properties are preserved. Do not treat the local map as a fetched snapshot of the provider document. Provider write precedes the local save, and save success is not independently reported.

Subscription history

The Firestore update’s nested user adds subscriptions_history to the resource-aware user, which already defines subscriptions and teams. It does not add last_action.

subscriptions_history is an array of stored plan history rows for this user/resource, empty with no rows. No paginator or explicit ordering. Each row has:

FieldType / presenceMeaning
subscription_start_date, subscription_end_datestored timestamp / nullableHistorical relationship interval; no timezone or exclusive-end guarantee.
created_atstored timestampCreation of the history row, not necessarily the beginning of access.
is_team_subscription, is_trialstored flagsHistorical team/trial state; serializer does not explicitly cast them.
new_subscriptionstored field / nullableRecorded replacement subscription value; no complete value set or current membership guarantee.
team_idstored integer ID / nullableRelated team when recorded.
plan_id, subscription_idstored integer IDs / nullableHistorical plan and Pricing references; no nested Pricing projection here.

History is not evidence of a current active membership, refund or provider cancellation. For serving content, make the access decision.

Full diagram

Use the arrow keys to scroll. Escape closes this view.

Search documentation

Enter at least 2 characters.

    ↑ ↓ move through results · Enter opens · Escape closes