fix(app): on Apple's systems the account's keys stay on this device

flutter_secure_storage's default accessibility on iOS and macOS
(unlocked) lets keychain items into encrypted backups, which restore on
another device. The account's unlocked keys are now kept
first_unlock_this_device (macOS through its data protection keychain, the
package's default there), and never synchronised to iCloud Keychain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-21 14:51:10 +02:00
commit 67b26e0ea0
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -0,0 +1,19 @@
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:halkyon_app/halkyon_app.dart';
void main() {
test("the account's keys stay on this device on Apple's systems: never in "
'a backup restored elsewhere, nor in iCloud Keychain', () {
for (final options in [
accountKeyStorage.iOptions,
accountKeyStorage.mOptions,
]) {
expect(
options.accessibility,
KeychainAccessibility.first_unlock_this_device,
);
expect(options.synchronizable, isFalse);
}
});
}