File tree 2 files changed +3
-0
lines changed
BitwardenShared/Core/Auth/Repositories
2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -760,6 +760,7 @@ extension DefaultAuthRepository: AuthRepository {
760
760
let userId = try await stateService. getAccountIdOrActiveId ( userId: userId)
761
761
762
762
// Clear all user data.
763
+ try await stateService. setSyncToAuthenticator ( false , userId: userId)
763
764
try await biometricsRepository. setBiometricUnlockKey ( authKey: nil )
764
765
try await keychainService. deleteItems ( for: userId)
765
766
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
2085
2085
biometricsRepository. setBiometricUnlockKeyError = nil
2086
2086
stateService. pinProtectedUserKeyValue [ " 1 " ] = " 1 "
2087
2087
stateService. encryptedPinByUserId [ " 1 " ] = " 1 "
2088
+ stateService. syncToAuthenticatorByUserId [ " 1 " ] = true
2088
2089
2089
2090
try await subject. logout ( userInitiated: true )
2090
2091
@@ -2095,6 +2096,7 @@ class AuthRepositoryTests: BitwardenTestCase { // swiftlint:disable:this type_bo
2095
2096
XCTAssertEqual ( vaultTimeoutService. removedIds, [ anneAccount. profile. userId] )
2096
2097
XCTAssertEqual ( stateService. pinProtectedUserKeyValue [ " 1 " ] , " 1 " )
2097
2098
XCTAssertEqual ( stateService. encryptedPinByUserId [ " 1 " ] , " 1 " )
2099
+ XCTAssertEqual ( stateService. syncToAuthenticatorByUserId [ " 1 " ] , false )
2098
2100
}
2099
2101
2100
2102
/// `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