Update: 2026-05-13 22:58:30
This commit is contained in:
@@ -6,6 +6,7 @@ class SecureStorage {
|
||||
static const String _keyToken = 'jwt_token';
|
||||
static const String _keyDeviceSecret = 'device_secret';
|
||||
static const String _keyUserId = 'user_id';
|
||||
static const String _keyEmail = 'user_email';
|
||||
|
||||
Future<void> saveToken(String token) async {
|
||||
await _storage.write(key: _keyToken, value: token);
|
||||
@@ -23,6 +24,14 @@ class SecureStorage {
|
||||
return await _storage.read(key: _keyDeviceSecret);
|
||||
}
|
||||
|
||||
Future<void> saveEmail(String email) async {
|
||||
await _storage.write(key: _keyEmail, value: email);
|
||||
}
|
||||
|
||||
Future<String?> getEmail() async {
|
||||
return await _storage.read(key: _keyEmail);
|
||||
}
|
||||
|
||||
Future<void> clearAll() async {
|
||||
await _storage.deleteAll();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user