How it works
- Your app signs the user in with Firebase Auth (Email/Password, Google Sign-In, Phone, or any other Firebase Auth provider).
- You configure the Portal SDK with a callback that returns a fresh Firebase ID token.
- During backup, the SDK encrypts the client backup share and stores the encryption key in the secure enclave, authenticated by the Firebase ID token.
- During recovery, the SDK retrieves the encryption key from the secure enclave using the same authentication, then decrypts the backup share to restore the wallet.
Prerequisites
- A Firebase project with Firebase Authentication enabled.
- At least one sign-in provider configured in Firebase Auth (Email/Password, Google Sign-In, Apple Sign-In, etc.).
- Your Firebase project registered with Portal (see below).
Register your Firebase project with Portal
You must register your Firebase project with Portal so that the secure enclave can validate your users’ Firebase ID tokens.- Go to the Portal Dashboard.
- Navigate to Configuration > Webhooks.
- In the Firebase Backup Authentication section, enter your Firebase Project ID and save.
You can also register the JWT provider programmatically via the Custodian API:
Add Firebase to your app
- iOS
- Android
- Flutter
If you have not already set up Firebase in your iOS app, follow the Firebase iOS setup guide. At a minimum, you need to:
- Add your iOS app in the Firebase Console.
- Download the
GoogleService-Info.plistfile and add it to your Xcode project. - Add the
FirebaseAuthdependency via Swift Package Manager or CocoaPods. - Call
FirebaseApp.configure()in yourAppDelegateor app entry point.
Supported platforms
Firebase Auth Backup is currently available on:- iOS - See the iOS Back up a wallet guide
- Android - See the Android Back up a wallet guide
- Flutter - See the Flutter Back up a wallet guide
Support for React Native and Web is coming soon.