From a87c1c1210898d8f8901ee660bd3a4f75d2d67b2 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 24 Oct 2022 14:45:58 -0500 Subject: [PATCH] fix(mobile) not possible to sign out when option is enable (#860) --- .../login/providers/authentication.provider.dart | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mobile/lib/modules/login/providers/authentication.provider.dart b/mobile/lib/modules/login/providers/authentication.provider.dart index c642f93b71..f75fe3b544 100644 --- a/mobile/lib/modules/login/providers/authentication.provider.dart +++ b/mobile/lib/modules/login/providers/authentication.provider.dart @@ -164,6 +164,20 @@ class AuthenticationNotifier extends StateNotifier { _assetCacheService.invalidate(); _albumCacheService.invalidate(); _sharedAlbumCacheService.invalidate(); + + // Remove login info from local storage + var loginInfo = + Hive.box(hiveLoginInfoBox).get(savedLoginInfoKey); + if (loginInfo != null) { + loginInfo.email = ""; + loginInfo.password = ""; + loginInfo.isSaveLogin = false; + + Hive.box(hiveLoginInfoBox).put( + savedLoginInfoKey, + loginInfo, + ); + } return true; }