mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-09 07:28:14 -07:00
fix: Unable to log-out user with incorrect/old token (#104)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
0761a50bfa
commit
d3e34d57e0
2 changed files with 11 additions and 14 deletions
|
|
@ -64,8 +64,12 @@ class SharedUtility {
|
|||
Future<bool?> removeAccount(AccountModel? account) async {
|
||||
if (account == null) return null;
|
||||
|
||||
//Try to logout user
|
||||
await ref.read(userProvider.notifier).forceLogoutUser(account);
|
||||
try {
|
||||
//Try to logout user
|
||||
await ref.read(userProvider.notifier).forceLogoutUser(account);
|
||||
} catch (e) {
|
||||
log('Unable to log-out user forcing anyway $e');
|
||||
}
|
||||
|
||||
//Remove from local database
|
||||
final savedAccounts = getAccounts();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue