Files
buzz/mobile/lib/shared/storage/secure_storage.dart
Wes 0ba4ae8d03 fix(mobile): preserve unreadable identities and repair recovery choices
Use shared fail-closed Android secure-storage options across all namespace clients. Allow token-only legacy records through cloud recovery, clarify consent, and prevent stale chooser taps from interrupting cancellation.

Exercise real Android plugin decryption failures with an isolated emulator probe, and cover actual link-entry consent and lifecycle guards.

Co-authored-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
2026-10-15 16:11:26 -07:00

19 lines
725 B
Dart

import 'package:flutter_secure_storage/flutter_secure_storage.dart';
/// Android caches the first configuration per namespace. Every production
/// client must use these options: a failed read must never delete a key.
const secureStorageAndroidOptions = AndroidOptions(resetOnError: false);
/// Preserve the existing community-storage namespace and iOS accessibility.
const communitySecureStorage = FlutterSecureStorage(
aOptions: secureStorageAndroidOptions,
);
/// Account credentials and identities remain device-only on iOS.
const accountSecureStorage = FlutterSecureStorage(
aOptions: secureStorageAndroidOptions,
iOptions: IOSOptions(
accessibility: KeychainAccessibility.first_unlock_this_device,
),
);