mirror of
https://github.com/bitwarden/mobile
synced 2026-01-19 17:03:21 +00:00
[PM-2293] Fix login with device normal flow and SSO
This commit is contained in:
@@ -221,6 +221,13 @@ namespace Bit.App.Pages
|
||||
var authResult = await _authService.LogInPasswordlessAsync(Email, _requestAccessCode, _requestId, _requestKeyPair.Item2, response.Key, response.MasterPasswordHash);
|
||||
await AppHelpers.ResetInvalidUnlockAttemptsAsync();
|
||||
|
||||
if(authResult == null && await _stateService.IsAuthenticatedAsync())
|
||||
{
|
||||
_syncService.FullSyncAsync(true).FireAndForget();
|
||||
LogInSuccessAction?.Invoke();
|
||||
return;
|
||||
}
|
||||
|
||||
if (await HandleCaptchaAsync(authResult.CaptchaSiteKey, authResult.CaptchaNeeded, CheckLoginRequestStatus))
|
||||
{
|
||||
return;
|
||||
@@ -237,7 +244,6 @@ namespace Bit.App.Pages
|
||||
else
|
||||
{
|
||||
_syncService.FullSyncAsync(true).FireAndForget();
|
||||
await _deviceTrustCryptoService.TrustDeviceIfNeededAsync();
|
||||
LogInSuccessAction?.Invoke();
|
||||
}
|
||||
}
|
||||
@@ -255,6 +261,15 @@ namespace Bit.App.Pages
|
||||
var response = await _authService.PasswordlessCreateLoginRequestAsync(_email, AuthRequestType);
|
||||
if (response != null)
|
||||
{
|
||||
//TODO TDE if is admin type save to memory to later see if it was approved
|
||||
/*
|
||||
const adminAuthReqStorable = new AdminAuthRequestStorable({
|
||||
id: reqResponse.id,
|
||||
privateKey: this.authRequestKeyPair.privateKey,
|
||||
});
|
||||
|
||||
await this.stateService.setAdminAuthRequest(adminAuthReqStorable);
|
||||
*/
|
||||
FingerprintPhrase = response.FingerprintPhrase;
|
||||
_requestId = response.Id;
|
||||
_requestAccessCode = response.RequestAccessCode;
|
||||
|
||||
Reference in New Issue
Block a user