diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 925453e86..6522f5705 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -63,7 +63,7 @@ PODS: - Flutter - flutter_native_splash (0.0.1): - Flutter - - flutter_secure_storage (3.3.1): + - flutter_secure_storage (6.0.0): - Flutter - flutter_sodium (0.0.1): - Flutter @@ -337,7 +337,7 @@ SPEC CHECKSUMS: flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef - flutter_secure_storage: 7953c38a04c3fdbb00571bcd87d8e3b5ceb9daec + flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be flutter_sodium: c84426b4de738514b5b66cfdeb8a06634e72fe0b fluttertoast: eb263d302cc92e04176c053d2385237e9f43fad0 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a diff --git a/lib/core/configuration.dart b/lib/core/configuration.dart index e1e5ba762..cccc1ecf8 100644 --- a/lib/core/configuration.dart +++ b/lib/core/configuration.dart @@ -62,8 +62,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"; static const hasSelectedAllFoldersForBackupKey = "has_selected_all_folders_for_backup"; static const anonymousUserIDKey = "anonymous_user_id"; @@ -89,8 +88,9 @@ class Configuration { late String _sharedDocumentsMediaDirectory; String? _volatilePassword; - final _secureStorageOptionsIOS = - const IOSOptions(accessibility: IOSAccessibility.first_unlock); + final _secureStorageOptionsIOS = const IOSOptions( + accessibility: KeychainAccessibility.first_unlock_this_device, + ); Future init() async { _preferences = await SharedPreferences.getInstance(); @@ -597,11 +597,9 @@ class Configuration { } Future _migrateSecurityStorageToFirstUnlock() async { - final hasMigratedSecureStorageToFirstUnlock = - _preferences.getBool(hasMigratedSecureStorageToFirstUnlockKey) ?? false; - if (!hasMigratedSecureStorageToFirstUnlock && - _key != null && - _secretKey != null) { + final hasMigratedSecureStorage = + _preferences.getBool(hasMigratedSecureStorageKey) ?? false; + if (!hasMigratedSecureStorage && _key != null && _secretKey != null) { await _secureStorage.write( key: keyKey, value: _key, @@ -613,7 +611,7 @@ class Configuration { iOptions: _secureStorageOptionsIOS, ); await _preferences.setBool( - hasMigratedSecureStorageToFirstUnlockKey, + hasMigratedSecureStorageKey, true, ); } diff --git a/pubspec.lock b/pubspec.lock index 32aeb5e61..03e81eb76 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -670,10 +670,50 @@ packages: dependency: "direct main" description: name: flutter_secure_storage - sha256: "9f3dd2ac3b6875b0fde5b04734789c3ef35ba3965c18e99dd564a7a2f8056df6" + sha256: "98352186ee7ad3639ccc77ad7924b773ff6883076ab952437d20f18a61f0a7c5" url: "https://pub.dev" source: hosted - version: "4.2.1" + version: "8.0.0" + flutter_secure_storage_linux: + dependency: transitive + description: + name: flutter_secure_storage_linux + sha256: "0912ae29a572230ad52d8a4697e5518d7f0f429052fd51df7e5a7952c7efe2a3" + url: "https://pub.dev" + source: hosted + version: "1.1.3" + flutter_secure_storage_macos: + dependency: transitive + description: + name: flutter_secure_storage_macos + sha256: "083add01847fc1c80a07a08e1ed6927e9acd9618a35e330239d4422cd2a58c50" + url: "https://pub.dev" + source: hosted + version: "3.0.0" + flutter_secure_storage_platform_interface: + dependency: transitive + description: + name: flutter_secure_storage_platform_interface + sha256: b3773190e385a3c8a382007893d678ae95462b3c2279e987b55d140d3b0cb81b + url: "https://pub.dev" + source: hosted + version: "1.0.1" + flutter_secure_storage_web: + dependency: transitive + description: + name: flutter_secure_storage_web + sha256: "42938e70d4b872e856e678c423cc0e9065d7d294f45bc41fc1981a4eb4beaffe" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter_secure_storage_windows: + dependency: transitive + description: + name: flutter_secure_storage_windows + sha256: fc2910ec9b28d60598216c29ea763b3a96c401f0ce1d13cdf69ccb0e5c93c3ee + url: "https://pub.dev" + source: hosted + version: "2.0.0" flutter_sodium: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 37414178d..944d84d64 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,7 @@ description: ente photos application # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 0.7.38+438 +version: 0.7.39+439 environment: sdk: '>=2.17.0 <3.0.0' @@ -64,7 +64,7 @@ dependencies: sdk: flutter flutter_native_splash: ^2.2.0+1 flutter_password_strength: ^0.1.6 - flutter_secure_storage: ^4.2.0 + flutter_secure_storage: ^8.0.0 flutter_sodium: ^0.2.0 flutter_typeahead: ^4.0.0 fluttertoast: ^8.0.6