FirebaseStorage

constructor(apiKey: String, encryption: PortalEncryption, getToken: suspend () -> String?, tbsHost: String = "backup.web.portalhq.io")

Parameters

apiKey

The Portal client API key used for the Authorization header.

encryption

The encryption utility for encrypting/decrypting backup shares.

getToken

A suspend lambda that returns a fresh Firebase ID token. This should typically call FirebaseAuth.getInstance().currentUser?.getIdToken(true).

tbsHost

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.