From d5722e72e02cde6b949a6b2cdb93c6a1527f7338 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Thu, 30 May 2024 03:16:58 -0600 Subject: [PATCH] Fix release branch VPN auth issues (#2903) --- DuckDuckGo/AppDependencyProvider.swift | 2 +- .../NetworkProtectionPacketTunnelProvider.swift | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/DuckDuckGo/AppDependencyProvider.swift b/DuckDuckGo/AppDependencyProvider.swift index 9effebee33..76221f2fef 100644 --- a/DuckDuckGo/AppDependencyProvider.swift +++ b/DuckDuckGo/AppDependencyProvider.swift @@ -152,7 +152,7 @@ class AppDependencyProvider: DependencyProvider { networkProtectionKeychainTokenStore = NetworkProtectionKeychainTokenStore(keychainType: .dataProtection(.unspecified), serviceName: "\(Bundle.main.bundleIdentifier!).authToken", errorEvents: .networkProtectionAppDebugEvents, - isSubscriptionEnabled: accountManager.isUserAuthenticated, + isSubscriptionEnabled: true, accessTokenProvider: accessTokenProvider) networkProtectionTunnelController = NetworkProtectionTunnelController(accountManager: accountManager, tokenStore: networkProtectionKeychainTokenStore) diff --git a/PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift b/PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift index 015411ff69..856c68e713 100644 --- a/PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift +++ b/PacketTunnelProvider/NetworkProtection/NetworkProtectionPacketTunnelProvider.swift @@ -281,7 +281,6 @@ final class NetworkProtectionPacketTunnelProvider: PacketTunnelProvider { authService: authService) self.accountManager = accountManager let featureVisibility = NetworkProtectionVisibilityForTunnelProvider(accountManager: accountManager) - let isSubscriptionEnabled = featureVisibility.isPrivacyProLaunched() let accessTokenProvider: () -> String? = { if featureVisibility.shouldMonitorEntitlement() { return { accountManager.accessToken } @@ -289,7 +288,7 @@ final class NetworkProtectionPacketTunnelProvider: PacketTunnelProvider { return { nil } }() let tokenStore = NetworkProtectionKeychainTokenStore(keychainType: .dataProtection(.unspecified), errorEvents: nil, - isSubscriptionEnabled: isSubscriptionEnabled, + isSubscriptionEnabled: true, accessTokenProvider: accessTokenProvider) let errorStore = NetworkProtectionTunnelErrorStore() @@ -310,7 +309,7 @@ final class NetworkProtectionPacketTunnelProvider: PacketTunnelProvider { providerEvents: Self.packetTunnelProviderEvents, settings: settings, defaults: .networkProtectionGroupDefaults, - isSubscriptionEnabled: isSubscriptionEnabled, + isSubscriptionEnabled: true, entitlementCheck: { return await Self.entitlementCheck(accountManager: accountManager) }) startMonitoringMemoryPressureEvents() observeServerChanges()