File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
BitwardenShared/Core/Auth/Repositories Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -760,6 +760,7 @@ extension DefaultAuthRepository: AuthRepository {
760760 let userId = try await stateService. getAccountIdOrActiveId ( userId: userId)
761761
762762 // Clear all user data.
763+ try await stateService. setSyncToAuthenticator ( false , userId: userId)
763764 try await biometricsRepository. setBiometricUnlockKey ( authKey: nil )
764765 try await keychainService. deleteItems ( for: userId)
765766 await vaultTimeoutService. remove ( userId: userId)
Original file line number Diff line number Diff line change @@ -2085,6 +2085,7 @@ class AuthRepositoryTests: BitwardenTestCase { // swiftlint:disable:this type_bo
20852085 biometricsRepository. setBiometricUnlockKeyError = nil
20862086 stateService. pinProtectedUserKeyValue [ " 1 " ] = " 1 "
20872087 stateService. encryptedPinByUserId [ " 1 " ] = " 1 "
2088+ stateService. syncToAuthenticatorByUserId [ " 1 " ] = true
20882089
20892090 try await subject. logout ( userInitiated: true )
20902091
@@ -2095,6 +2096,7 @@ class AuthRepositoryTests: BitwardenTestCase { // swiftlint:disable:this type_bo
20952096 XCTAssertEqual ( vaultTimeoutService. removedIds, [ anneAccount. profile. userId] )
20962097 XCTAssertEqual ( stateService. pinProtectedUserKeyValue [ " 1 " ] , " 1 " )
20972098 XCTAssertEqual ( stateService. encryptedPinByUserId [ " 1 " ] , " 1 " )
2099+ XCTAssertEqual ( stateService. syncToAuthenticatorByUserId [ " 1 " ] , false )
20982100 }
20992101
21002102 /// `logout` successfully logs out a user clearing pins because of policy Remove unlock with pin being enabled.
You can’t perform that action at this time.
0 commit comments