Update the Bitwarden SDK (#1271)

This commit is contained in:
David Perez
2024-04-15 14:02:38 -05:00
committed by Álison Fernandes
parent 2523239557
commit cec70a9c64
6 changed files with 19 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ interface AuthSdkSource {
*/
suspend fun makeRegisterTdeKeysAndUnlockVault(
userId: String,
email: String,
orgPublicKey: String,
rememberDevice: Boolean,
): Result<RegisterTdeKeyResponse>

View File

@@ -78,12 +78,14 @@ class AuthSdkSourceImpl(
override suspend fun makeRegisterTdeKeysAndUnlockVault(
userId: String,
email: String,
orgPublicKey: String,
rememberDevice: Boolean,
): Result<RegisterTdeKeyResponse> = runCatching {
getClient(userId = userId)
.auth()
.makeRegisterTdeKeys(
email = email,
orgPublicKey = orgPublicKey,
rememberDevice = rememberDevice,
)

View File

@@ -367,6 +367,7 @@ class AuthRepositoryImpl(
.flatMap { organizationKeys ->
authSdkSource.makeRegisterTdeKeysAndUnlockVault(
userId = userId,
email = account.profile.email,
orgPublicKey = organizationKeys.publicKey,
rememberDevice = authDiskSource.shouldTrustDevice,
)