Firebase Storage
constructor(credentials: PortalCredentials, encryption: PortalEncryption, getFirebaseToken: suspend () -> String?, tbsHost: String = "backup.web.portalhq.io")
Parameters
credentials
Supplies the Portal bearer token for the Authorization header.
encryption
The encryption utility for encrypting/decrypting backup shares.
get Firebase Token
A suspend lambda that returns a fresh Firebase ID token. This should typically call FirebaseAuth.getInstance().currentUser?.getIdToken(true).
tbs Host
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.
constructor(apiKey: String, encryption: PortalEncryption, getToken: suspend () -> String?, tbsHost: String = "backup.web.portalhq.io")
Deprecated
Provide a PortalCredentials instead of a raw key.
Constructs the storage adapter with a raw Client API Key.