Firebase Storage
Handles Firebase-based cloud storage operations for backup, recovery, and eject flows.
This storage implementation communicates directly with TBS (Trustless Backup Service) using Firebase ID tokens for authentication. The Firebase token is sent via the X-Firebase-Token header alongside the standard Authorization header (client API key).
The customer provides a getFirebaseToken callback that returns a fresh Firebase ID token. This is called before each TBS request to ensure the token is valid.
Parameters
Supplies the Portal bearer token for the Authorization header.
The encryption utility for encrypting/decrypting backup shares.
A suspend lambda that returns a fresh Firebase ID token. This should typically call FirebaseAuth.getInstance().currentUser?.getIdToken(true).
The TBS host URL. Defaults to "backup.web.portalhq.io". The scheme is auto-detected: localhost/127.0.0.1 uses http://, all other hosts use https://. Pass a full URL with scheme to override.
Constructors
Constructs the storage adapter with a raw Client API Key.