From 9769087fd855d3970f20f766a92ac82c3a81f528 Mon Sep 17 00:00:00 2001 From: Marcos Date: Tue, 19 May 2026 09:26:51 +0200 Subject: [PATCH] feat: Clear authentication tokens and shared preferences on app shutdown --- lib/app.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/app.dart b/lib/app.dart index a19a17d..9bde887 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -552,6 +552,10 @@ class _NotesAppState extends State 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');