Skip to content

Commit 9690bb1

Browse files
🍒 PM-17634 - Update When The App Checks If Authenticator Sync is Enabled (#1455)
1 parent 54f6c86 commit 9690bb1

File tree

2 files changed

+152
-50
lines changed

2 files changed

+152
-50
lines changed

‎BitwardenShared/Core/Platform/Services/AuthenticatorSyncService.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,6 @@ actor DefaultAuthenticatorSyncService: NSObject, AuthenticatorSyncService {
143143
guard !started else { return }
144144
started = true
145145

146-
guard await configService.getFeatureFlag(FeatureFlag.enableAuthenticatorSync,
147-
defaultValue: false) else {
148-
return
149-
}
150-
151146
syncSubscriber = Task {
152147
for await (userId, _) in await self.stateService.syncToAuthenticatorPublisher().values {
153148
guard let userId else { continue }
@@ -253,6 +248,13 @@ actor DefaultAuthenticatorSyncService: NSObject, AuthenticatorSyncService {
253248
/// - Parameter userId: The userId of the user whose sync status is being determined.
254249
///
255250
private func determineSyncForUserId(_ userId: String) async throws {
251+
guard
252+
await configService.getFeatureFlag(
253+
FeatureFlag.enableAuthenticatorSync,
254+
defaultValue: false
255+
)
256+
else { return }
257+
256258
if try await stateService.getSyncToAuthenticator(userId: userId) {
257259
enableSyncForUserId(userId)
258260
} else {

0 commit comments

Comments
 (0)