feat: Clear authentication tokens and shared preferences on app shutdown
This commit is contained in:
@@ -552,6 +552,10 @@ class _NotesAppState extends State<NotesApp>
|
||||
await database?.close();
|
||||
|
||||
await _vaultService.clearEncryptionKey();
|
||||
await AuthApi.instance.clearTokens();
|
||||
|
||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
await prefs.clear();
|
||||
|
||||
final Directory supportDir = await getApplicationSupportDirectory();
|
||||
final String dbPath = p.join(supportDir.path, 'notes.sqlite');
|
||||
|
||||
Reference in New Issue
Block a user