소스 검색

Upgrade SecureStorage

vishnukvmd 2 년 전
부모
커밋
e2a1b429e2
3개의 변경된 파일9개의 추가작업 그리고 25개의 파일을 삭제
  1. 6 6
      lib/core/configuration.dart
  2. 1 17
      pubspec.lock
  3. 2 2
      pubspec.yaml

+ 6 - 6
lib/core/configuration.dart

@@ -38,8 +38,7 @@ class Configuration {
   static const tokenKey = "token";
   static const encryptedTokenKey = "encrypted_token";
   static const userIDKey = "user_id";
-  static const hasMigratedSecureStorageToFirstUnlockKey =
-      "has_migrated_secure_storage_to_first_unlock";
+  static const hasMigratedSecureStorageKey = "has_migrated_secure_storage";
 
   final kTempFolderDeletionTimeBuffer = const Duration(days: 1).inMicroseconds;
 
@@ -63,8 +62,9 @@ class Configuration {
   late String _sharedDocumentsMediaDirectory;
   String? _volatilePassword;
 
-  final _secureStorageOptionsIOS =
-      const IOSOptions(accessibility: KeychainAccessibility.first_unlock);
+  final _secureStorageOptionsIOS = const IOSOptions(
+    accessibility: KeychainAccessibility.first_unlock_this_device,
+  );
 
   // const IOSOptions(accessibility: IOSAccessibility.first_unlock);
 
@@ -462,7 +462,7 @@ class Configuration {
 
   Future<void> _migrateSecurityStorageToFirstUnlock() async {
     final hasMigratedSecureStorageToFirstUnlock =
-        _preferences.getBool(hasMigratedSecureStorageToFirstUnlockKey) ?? false;
+        _preferences.getBool(hasMigratedSecureStorageKey) ?? false;
     if (!hasMigratedSecureStorageToFirstUnlock &&
         _key != null &&
         _secretKey != null) {
@@ -477,7 +477,7 @@ class Configuration {
         iOptions: _secureStorageOptionsIOS,
       );
       await _preferences.setBool(
-        hasMigratedSecureStorageToFirstUnlockKey,
+        hasMigratedSecureStorageKey,
         true,
       );
     }

+ 1 - 17
pubspec.lock

@@ -1307,14 +1307,6 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "1.2.0"
-  styled_text:
-    dependency: "direct main"
-    description:
-      name: styled_text
-      sha256: f72928d1ebe8cb149e3b34a689cb1ddca696b808187cf40ac3a0bd183dff379c
-      url: "https://pub.dev"
-    source: hosted
-    version: "7.0.0"
   synchronized:
     dependency: transitive
     description:
@@ -1523,14 +1515,6 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "6.1.0"
-  xmlstream:
-    dependency: transitive
-    description:
-      name: xmlstream
-      sha256: "2d10c69a9d5fc46f71798b80ee6db15bc0d5bf560fdbdd264776cbeee0c83631"
-      url: "https://pub.dev"
-    source: hosted
-    version: "1.0.0"
   yaml:
     dependency: transitive
     description:
@@ -1541,4 +1525,4 @@ packages:
     version: "3.1.1"
 sdks:
   dart: ">=2.18.0 <3.0.0"
-  flutter: ">=3.7.0"
+  flutter: ">=3.3.0"

+ 2 - 2
pubspec.yaml

@@ -1,6 +1,6 @@
 name: ente_auth
 description: ente two-factor authenticator
-version: 1.0.34+34
+version: 1.0.35+35
 publish_to: none
 
 environment:
@@ -35,7 +35,7 @@ dependencies:
   flutter_localizations:
     sdk: flutter
   flutter_native_splash: ^2.2.13
-  flutter_secure_storage: ^6.0.0
+  flutter_secure_storage: ^8.0.0
   flutter_slidable: ^2.0.0
   flutter_sodium:
     git: