mirror of
https://github.com/bitwarden/mobile
synced 2025-12-15 15:53:44 +00:00
EC-312 Fix crash on entering invalid credentials five times on Autofill (#1988)
This commit is contained in:
committed by
GitHub
parent
2d2a883b96
commit
d2fbf5bdea
@@ -123,7 +123,11 @@ namespace Bit.App.Utilities.AccountManagement
|
||||
await _vaultTimeoutService.LockAsync(true);
|
||||
break;
|
||||
case AccountsManagerMessageCommands.LOGOUT:
|
||||
await Device.InvokeOnMainThreadAsync(() => LogOutAsync(message.Data as Tuple<string, bool, bool>));
|
||||
var extras = message.Data as Tuple<string, bool, bool>;
|
||||
var userId = extras?.Item1;
|
||||
var userInitiated = extras?.Item2 ?? true;
|
||||
var expired = extras?.Item3 ?? false;
|
||||
await Device.InvokeOnMainThreadAsync(() => LogOutAsync(userId, userInitiated, expired));
|
||||
break;
|
||||
case AccountsManagerMessageCommands.LOGGED_OUT:
|
||||
// Clean up old migrated key if they ever log out.
|
||||
@@ -181,12 +185,8 @@ namespace Bit.App.Utilities.AccountManagement
|
||||
});
|
||||
}
|
||||
|
||||
private async Task LogOutAsync(Tuple<string, bool, bool> extras)
|
||||
public async Task LogOutAsync(string userId, bool userInitiated, bool expired)
|
||||
{
|
||||
var userId = extras?.Item1;
|
||||
var userInitiated = extras?.Item2 ?? true;
|
||||
var expired = extras?.Item3 ?? false;
|
||||
|
||||
await AppHelpers.LogOutAsync(userId, userInitiated);
|
||||
await NavigateOnAccountChangeAsync();
|
||||
_authService.LogOut(() =>
|
||||
|
||||
Reference in New Issue
Block a user