feat: Clear authentication tokens and shared preferences on app shutdown

This commit is contained in:
2026-05-19 09:26:51 +02:00
parent a5ab223e1f
commit 9769087fd8
+4
View File
@@ -552,6 +552,10 @@ class _NotesAppState extends State<NotesApp>
await database?.close(); await database?.close();
await _vaultService.clearEncryptionKey(); await _vaultService.clearEncryptionKey();
await AuthApi.instance.clearTokens();
final SharedPreferences prefs = await SharedPreferences.getInstance();
await prefs.clear();
final Directory supportDir = await getApplicationSupportDirectory(); final Directory supportDir = await getApplicationSupportDirectory();
final String dbPath = p.join(supportDir.path, 'notes.sqlite'); final String dbPath = p.join(supportDir.path, 'notes.sqlite');