-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Urgent] Saved data automatically removed after 2,3 hours from Android and IOS devices. #797
Comments
Please add what motivates you to think that saved data removed after 2,3 hours. Add some proof too. |
@sumitsharansatsangi I am saving my auth data into secure storage at login. |
Many who? Please provide some hard proof? |
@MohsinIkram-Auxilium, Don't put what class you are using , instead put your code, you implementation. |
@Daniel-Cong I have Google Pixal 4a(5G) device. |
Hi @Daniel-Cong @sumitsharansatsangi, So unfortunatly due to some reasons there was a bug from the backend side. Our token was expiring after 2,3 hours. So I apologised to you. Your package is working great. |
This issue is stale because it has been open for 60 days with no activity. |
I'm using this package. It is working fine for short time.
I observed after few hours, all data cleaned up from the secure storage.
Most of our users are facing the issue.
Need your urgent support. Thanks
Here is the class I'm using :
`class SecureStorageManager {
static SecureStorageManager? _instance;
late FlutterSecureStorage _storage;
bool _initialized = false;
SecureStorageManager._internal();
factory SecureStorageManager() {
_instance ??= SecureStorageManager._internal();
return _instance!;
}
Future initialize() async {
if (!_initialized) {
_storage = const FlutterSecureStorage(
aOptions: AndroidOptions(
encryptedSharedPreferences: true, // Secure preferences on Android
),
// iOptions: IOSOptions(
// accessibility: KeychainAccessibility.first_unlock, // Secure Keychain on iOS
// ),
);
_initialized = true;
}
}
Future setString(String key, String value) async {
try {
await _storage.write(key: key, value: value);
} catch (e) {
Debugger.log('Error writing value: $e');
}
}
Future<String?> getString(String key) async {
try {
return await _storage.read(key: key);
} catch (e) {
Debugger.log('Error reading value: $e');
return null;
}
}
}`
The text was updated successfully, but these errors were encountered: