Portal-Managed Backups
Portal lets you securely back up your users’ MPC wallets so they can recover their wallets even if their device is lost or damaged. By default, Portal encrypts and stores both backup shares (“Portal-Managed Backups”):- The client backup share is encrypted on the user’s device, with the encryption key stored using their chosen backup method (Google Drive, iCloud, Password, Passkey, or Firebase Auth). The encrypted share is then stored by Portal.
- The custodian backup share is encrypted and stored by Portal, with the encryption key stored in our KMS infrastructure.
By default, Portal manages storing both the encrypted client backup share and the custodian backup share for you. If you prefer to store and manage the backup shares in your own infrastructure instead of using Portal-Managed Backups, see our Self-Managed Backups guide.
Backup Methods
You can choose one or more backup methods for storing the encryption key for the client backup share.Passkey + Enclave
Allow customers to create a native passkey on their device that is used to authenticate into a secure enclave that holds the encryption key for the user. Customer’s passkeys are backed up to the native cloud storage for their device.Implementation Requirements
- Configure passkey storage with a relying party.
- Set up your associated domain correctly in your app.
Use Portal as your relying party
- Add
portalhq.ioas a web credential domain in your app. - Share your app bundle id with the Portal Team.
Use your own domain as the relying party
Ensure you have set up your associated domain correctly in your app and that you are serving an aasa file from whatever your relying party domain is set to. You will need to be sure you have thewebcredential field set properly for your app in your aasa file.
Relying party
A relying party is a trusted domain that is tied to the public key credentials of your users for their passkey. We offer the option to useportalhq.io as your relying party domain. It requires you to add portalhq.io as an Associated Domain in your application and share your team id + application bundle id. If you already have your domain as a webcredential for your application then you can simply pass in your domain as the relying party and everything should work.
- Portal-Managed Backups (default)
- Self-Managed Backups
Password/PIN
Allow customers to create a password/pin. Customers can either remember the password or store it in a password storage manager.Implementation Requirements
- Create a UI for password input.
- Enforce password requirements. Customer can choose between password, PIN code, passcode, or any other text-based input.
- If user forgets password there are no additional recovery options.
- Portal-Managed Backups
- Self-Managed Backups
Firebase Auth Backup
Allow customers to use their existing Firebase Authentication to authenticate into a secure enclave that holds the encryption key for the user. The Portal SDK leverages Firebase ID tokens to securely store and retrieve encryption keys from the secure enclave. This is ideal if your app already uses Firebase Auth — no additional authentication method is required from your users. See the Firebase Auth Backup setup guide for prerequisites and Firebase project configuration.Configure Firebase storage
After initializing your Portal instance, callconfigureFirebaseStorage with a getToken callback that returns a fresh Firebase ID token:
- Portal-Managed Backups (default)
- Self-Managed Backups
iCloud
See the docs on how to configure iCloud.iCloud backup is only available on iOS devices. On Android, use Google Drive or Passkey backup instead.
iCloud action handling:
- Portal-Managed Backups
- Self-Managed Backups
Google Drive
See the docs on how to configure Google Drive.Choosing a backup option
Pick where the encrypted backup is written via thebackupOption parameter on configureGoogleStorage:
After initializing Portal, configure Google Drive storage:
GoogleDrive action handling:
- Portal-Managed Backups
- Self-Managed Backups
Migrating existing users (AppData with fallback)
If your app previously shipped with the defaultcustomFolder configuration, switch to appDataFolderWithFallback so new backups land in AppData while existing users can still recover from the legacy custom folder:
Custom user-visible folder (default / legacy)
This is the behavior you get whenbackupOption is omitted — preserved for backward compatibility. You can still customize the folder name via folderName:
Checking Backup Status
You can check if a wallet has been backed up:Platform Support Matrix
Related Documentation