Skip to content

Commit

Permalink
Do not signout user on API failure (#2698)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/414235014887631/1207023339673018/f

Description:

Do not signOut user on Backend Failure
  • Loading branch information
afterxleep authored Apr 8, 2024
1 parent 913d725 commit f0f1ac5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 0 additions & 3 deletions DuckDuckGo/SettingsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,6 @@ extension SettingsViewModel {
// Account is active but there's not a valid subscription / entitlements
if await PurchaseManager.hasActiveSubscription() {
state.subscription.isSubscriptionPendingActivation = true
} else {
// Sign out in case access token is present but no subscription and there is no active transaction on Apple ID
signOutUser()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,9 @@ final class SubscriptionSettingsViewModel: ObservableObject {
date: subscription.expiresOrRenewsAt,
product: subscription.productId,
billingPeriod: subscription.billingPeriod)
case .failure:
AccountManager().signOut()
DispatchQueue.main.async {
self.state.shouldDismissView = true
}
default:
return

}
}
}
Expand Down

0 comments on commit f0f1ac5

Please sign in to comment.