Skip to content

Commit

Permalink
Fix release branch VPN auth issues (#2903)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsymons authored May 30, 2024
1 parent 7f9c6d8 commit d5722e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DuckDuckGo/AppDependencyProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,15 +281,14 @@ 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 }
}
return { nil } }()
let tokenStore = NetworkProtectionKeychainTokenStore(keychainType: .dataProtection(.unspecified),
errorEvents: nil,
isSubscriptionEnabled: isSubscriptionEnabled,
isSubscriptionEnabled: true,
accessTokenProvider: accessTokenProvider)

let errorStore = NetworkProtectionTunnelErrorStore()
Expand All @@ -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()
Expand Down

0 comments on commit d5722e7

Please sign in to comment.