mirror of
https://github.com/bitwarden/android.git
synced 2024-11-28 22:08:49 +03:00
Persist the pending auth request even past a logout (#1260)
This commit is contained in:
parent
defa16202f
commit
617ffbd36a
3 changed files with 2 additions and 5 deletions
|
@ -127,14 +127,13 @@ class AuthDiskSourceImpl(
|
||||||
storePrivateKey(userId = userId, privateKey = null)
|
storePrivateKey(userId = userId, privateKey = null)
|
||||||
storeOrganizationKeys(userId = userId, organizationKeys = null)
|
storeOrganizationKeys(userId = userId, organizationKeys = null)
|
||||||
storeOrganizations(userId = userId, organizations = null)
|
storeOrganizations(userId = userId, organizations = null)
|
||||||
storePendingAuthRequest(userId = userId, pendingAuthRequest = null)
|
|
||||||
storeUserBiometricUnlockKey(userId = userId, biometricsKey = null)
|
storeUserBiometricUnlockKey(userId = userId, biometricsKey = null)
|
||||||
storeMasterPasswordHash(userId = userId, passwordHash = null)
|
storeMasterPasswordHash(userId = userId, passwordHash = null)
|
||||||
storePolicies(userId = userId, policies = null)
|
storePolicies(userId = userId, policies = null)
|
||||||
storeAccountTokens(userId = userId, accountTokens = null)
|
storeAccountTokens(userId = userId, accountTokens = null)
|
||||||
|
|
||||||
// Do not remove the DeviceKey on logout, that is persisted indefinitely unless
|
// Do not remove the DeviceKey or PendingAuthRequest on logout, these are persisted
|
||||||
// the server no longer trusts the device.
|
// indefinitely unless the TDE flow explicitly removes them.
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getLastActiveTimeMillis(userId: String): Long? =
|
override fun getLastActiveTimeMillis(userId: String): Long? =
|
||||||
|
|
|
@ -229,7 +229,6 @@ class AuthDiskSourceTest {
|
||||||
|
|
||||||
authDiskSource.clearData(userId = userId)
|
authDiskSource.clearData(userId = userId)
|
||||||
|
|
||||||
assertNull(authDiskSource.getPendingAuthRequest(userId = userId))
|
|
||||||
assertNull(authDiskSource.getUserBiometricUnlockKey(userId = userId))
|
assertNull(authDiskSource.getUserBiometricUnlockKey(userId = userId))
|
||||||
assertNull(authDiskSource.getLastActiveTimeMillis(userId = userId))
|
assertNull(authDiskSource.getLastActiveTimeMillis(userId = userId))
|
||||||
assertNull(authDiskSource.getInvalidUnlockAttempts(userId = userId))
|
assertNull(authDiskSource.getInvalidUnlockAttempts(userId = userId))
|
||||||
|
|
|
@ -67,7 +67,6 @@ class FakeAuthDiskSource : AuthDiskSource {
|
||||||
storedOrganizations.remove(userId)
|
storedOrganizations.remove(userId)
|
||||||
storedPolicies.remove(userId)
|
storedPolicies.remove(userId)
|
||||||
storedAccountTokens.remove(userId)
|
storedAccountTokens.remove(userId)
|
||||||
storedPendingAuthRequests.remove(userId)
|
|
||||||
storedBiometricKeys.remove(userId)
|
storedBiometricKeys.remove(userId)
|
||||||
storedOrganizationKeys.remove(userId)
|
storedOrganizationKeys.remove(userId)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue