1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-17 16:53:26 +00:00

[SG-705] Popup when a request for authentication comes in on a logged-in account that is not active (#2135)

* [SG-705] Added pop up to perform account switching if the user receives a login request from another account.

* [SG-705] missing resource designer

* [SG-705] Fixed wrong key for state service variable.

* [SG-705] Fix formatting of account switch alert.

* [SG-705] dotnet format run

* [SG-705] Removed async

* [SG-705] Refactor on App
This commit is contained in:
André Bispo
2022-10-18 17:21:45 +01:00
committed by GitHub
parent d18efdea73
commit eefc9bd239
7 changed files with 242 additions and 207 deletions

View File

@@ -1277,20 +1277,18 @@ namespace Bit.Core.Services
await SetValueAsync(key, value, reconciledOptions);
}
public async Task<PasswordlessRequestNotification> GetPasswordlessLoginNotificationAsync(string userId = null)
public async Task<PasswordlessRequestNotification> GetPasswordlessLoginNotificationAsync()
{
var reconciledOptions = ReconcileOptions(new StorageOptions { UserId = userId },
await GetDefaultStorageOptionsAsync());
var key = Constants.PasswordlessLoginNofiticationKey(reconciledOptions.UserId);
return await GetValueAsync<PasswordlessRequestNotification>(key, reconciledOptions);
var options = await GetDefaultStorageOptionsAsync();
var key = Constants.PasswordlessLoginNotificationKey;
return await GetValueAsync<PasswordlessRequestNotification>(key, options);
}
public async Task SetPasswordlessLoginNotificationAsync(PasswordlessRequestNotification value, string userId = null)
public async Task SetPasswordlessLoginNotificationAsync(PasswordlessRequestNotification value)
{
var reconciledOptions = ReconcileOptions(new StorageOptions { UserId = userId },
await GetDefaultStorageOptionsAsync());
var key = Constants.PasswordlessLoginNofiticationKey(reconciledOptions.UserId);
await SetValueAsync(key, value, reconciledOptions);
var options = await GetDefaultStorageOptionsAsync();
var key = Constants.PasswordlessLoginNotificationKey;
await SetValueAsync(key, value, options);
}
// Helpers