Persist the pending auth request even past a logout (#1260)

This commit is contained in:
David Perez 2024-04-12 12:13:22 -05:00 committed by Álison Fernandes
parent defa16202f
commit 617ffbd36a
3 changed files with 2 additions and 5 deletions

View file

@ -127,14 +127,13 @@ class AuthDiskSourceImpl(
storePrivateKey(userId = userId, privateKey = null)
storeOrganizationKeys(userId = userId, organizationKeys = null)
storeOrganizations(userId = userId, organizations = null)
storePendingAuthRequest(userId = userId, pendingAuthRequest = null)
storeUserBiometricUnlockKey(userId = userId, biometricsKey = null)
storeMasterPasswordHash(userId = userId, passwordHash = null)
storePolicies(userId = userId, policies = null)
storeAccountTokens(userId = userId, accountTokens = null)
// Do not remove the DeviceKey on logout, that is persisted indefinitely unless
// the server no longer trusts the device.
// Do not remove the DeviceKey or PendingAuthRequest on logout, these are persisted
// indefinitely unless the TDE flow explicitly removes them.
}
override fun getLastActiveTimeMillis(userId: String): Long? =

View file

@ -229,7 +229,6 @@ class AuthDiskSourceTest {
authDiskSource.clearData(userId = userId)
assertNull(authDiskSource.getPendingAuthRequest(userId = userId))
assertNull(authDiskSource.getUserBiometricUnlockKey(userId = userId))
assertNull(authDiskSource.getLastActiveTimeMillis(userId = userId))
assertNull(authDiskSource.getInvalidUnlockAttempts(userId = userId))

View file

@ -67,7 +67,6 @@ class FakeAuthDiskSource : AuthDiskSource {
storedOrganizations.remove(userId)
storedPolicies.remove(userId)
storedAccountTokens.remove(userId)
storedPendingAuthRequests.remove(userId)
storedBiometricKeys.remove(userId)
storedOrganizationKeys.remove(userId)