mirror of
https://github.com/bitwarden/mobile.git
synced 2025-01-27 22:03:25 +01:00
[SG-1056] Fix login prompt loop for added accounts (#2357)
* SG-1056 Fix login prompt loop for added accounts * SG-1056 Fix PR comment
This commit is contained in:
parent
5a56d64211
commit
f42c677d5a
@ -125,16 +125,16 @@ namespace Bit.App.Pages
|
|||||||
AppResources.Ok);
|
AppResources.Ok);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await _stateService.SetRememberedEmailAsync(RememberEmail ? Email : null);
|
await _stateService.SetRememberedEmailAsync(RememberEmail ? Email : null);
|
||||||
var userId = await _stateService.GetUserIdAsync(Email);
|
var userId = await _stateService.GetUserIdAsync(Email);
|
||||||
if (!string.IsNullOrWhiteSpace(userId))
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(userId) &&
|
||||||
|
(await _stateService.GetEnvironmentUrlsAsync(userId))?.Base == _environmentService.BaseUrl &&
|
||||||
|
await _stateService.IsAuthenticatedAsync(userId))
|
||||||
{
|
{
|
||||||
var userEnvUrls = await _stateService.GetEnvironmentUrlsAsync(userId);
|
await _accountManager.PromptToSwitchToExistingAccountAsync(userId);
|
||||||
if (userEnvUrls?.Base == _environmentService.BaseUrl)
|
return;
|
||||||
{
|
|
||||||
await _accountManager.PromptToSwitchToExistingAccountAsync(userId);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
StartLoginAction();
|
StartLoginAction();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user