firebase_auth_secure_storage_flutter 0.1.1
firebase_auth_secure_storage_flutter: ^0.1.1 copied to clipboard
Unofficial secure storage for the Firebase Auth session of firebase_auth_providers_dart in Flutter apps: the Keychain, the Android Keystore, libsecret and DPAPI through flutter_secure_storage.
0.1.1 #
No code change. The constraint on firebase_auth_providers_dart is >=0.3.0 <0.5.0 instead of ^0.3.0, so
that the package can be used with firebase_auth_providers_dart 0.4.0.
0.1.0 #
- First version:
SecureAuthStorage, anAuthStorageoffirebase_auth_providers_darton top offlutter_secure_storage11.2, forFirebaseUserAuthand forFirebaseAuthDart.use(storageFor:)offirebase_auth_dart_platform, whose default storage it is.FirebaseUserAuthuses it only when passed. - Keys are stored as
<namespace>/<key>. The default namespace is unique per program and stable:firebase_auth_secure_storage:<app>, where<app>is a SHA-256 prefix of the executable path on macOS, Linux and Windows,sandboxon Android and iOS andwebon the web;namespaceoverrides it. On iOS and macOS the items use the fixed Keychain servicefirebase_auth_secure_storage. macOS uses the data-protection keychain, which needs thekeychain-access-groupsentitlement; Android uses the plugin's defaults. - The constructor does no I/O; the namespace and the store are first used at the first read or write.
- Every exception of the plugin becomes a
SecureAuthStorageExceptionthat names the platform, the operation and a remedy (Linux without a Secret Service or with a locked keyring, a missing macOS entitlement, a locked iOS device, an Android Keystore failure, a missing plugin). There is no fallback to a file.isUnavailablesays whether the store cannot be used at all in this run (no plugin, no Secret Service, a locked Linux keyring, a missing keychain entitlement, no keychain, DPAPI refusingCryptProtectDataorCryptUnprotectDatawithE_ACCESSDENIEDon Windows without an interactive logon) rather than failing for one value. The Windows remedy says that DPAPI needs an interactive logon (an SSH session or a service has none) for that case, and namesflutter_secure_storage.datfor the others. migrateFrom: a key missing in the secure store is moved from the given storage (read, write, read back and compare, then delete there); a sign-out deletes it there too. A failed read or delete of the old storage goes toonMigrationIssue; a failed secure write is rethrown and a read-back mismatch throwsSecureAuthStorageMigrationException, both leaving the old storage unchanged.example/is a macOS app with thekeychain-access-groupsentitlement, whose integration tests runSecureAuthStorageagainst the real data-protection keychain: a write with the defaults, a round trip, separate namespaces, both cases of a move from aFileAuthStorage, and no entry left behind. The workflowsecure_storage_signed_macos.ymlruns them in a signed build on main (on a push and by hand), with a Developer ID certificate and profile from fastlane match (readonly, Workload Identity Federation, no secrets) and the owner's approval; all six tests passed on its first run. The key is fetched only after the dependencies are resolved from the committed lock files.