Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscription oauth v2 #1033

Open
wants to merge 126 commits into
base: main
Choose a base branch
from

Conversation

federicocappelli
Copy link
Member

@federicocappelli federicocappelli commented Oct 25, 2024

Task/Issue URL: https://app.asana.com/0/1205842942115003/1207991044706235/f
iOS PR: duckduckgo/iOS#3480
macOS PR: duckduckgo/macos-browser#3580
What kind of version bump will this require?: Major
CC: @miasma13

Description:

This PR introduces the use of OAuth V2 authentication in Privacy Pro Subscription.
The code changes are comprehensive due to the paradigm changes between the old access token lifecycle and the new JWT lifecycle.
The Subscription UI and UX should be unchanged.

Steps to test this PR:
Test all Privacy Pro Subscription features and UX, more details here


Internal references:

Software Engineering Expectations
Technical Design Template

# Conflicts:
#	Package.resolved
#	Package.swift
#	Sources/MaliciousSiteProtection/Logger+MaliciousSiteProtection.swift
#	Sources/Networking/v2/APIRequestV2.swift
#	Sources/Networking/v2/APIResponseV2.swift
#	Sources/Subscription/SubscriptionFeatureMappingCache.swift
#	Sources/TestUtils/MockLegacyTokenStorage.swift
#	Tests/NetworkingTests/v2/APIServiceTests.swift
# Conflicts:
#	Package.resolved
#	Package.swift
#	Sources/MaliciousSiteProtection/API/APIClient.swift
#	Sources/MaliciousSiteProtection/Model/Match.swift
#	Sources/Networking/v2/APIRequestV2.swift
#	Sources/Networking/v2/Extensions/HTTPURLResponse+Cookie.swift
#	Sources/Subscription/SubscriptionFeatureMappingCache.swift
#	Sources/TestUtils/MockLegacyTokenStorage.swift
#	Sources/TestUtils/MockTokenStorage.swift
#	Tests/MaliciousSiteProtectionTests/MaliciousSiteProtectionAPIClientTests.swift
#	Tests/NetworkingTests/v2/APIServiceTests.swift
#	Tests/PhishingDetectionTests/Mocks/PhishingDetectorMock.swift
# Conflicts:
#	Sources/MaliciousSiteProtection/API/APIClient.swift
#	Sources/Subscription/Flows/Models/SubscriptionOptions.swift
#	Sources/Subscription/Managers/StorePurchaseManager/StorePurchaseManager.swift
#	Sources/SubscriptionTestingUtilities/SubscriptionFeatureMappingCacheMock.swift
#	Tests/SubscriptionTests/Flows/Models/SubscriptionOptionsTests.swift
# Conflicts:
#	Sources/Subscription/Flows/AppStore/AppStoreAccountManagementFlow.swift
attempt to clean out tests output in CI reverted
@@ -29,6 +29,7 @@ extension APIClient {
extension APIClient: APIClient.Mockable {}

public protocol APIClientEnvironment {
func queryItems(for requestType: APIRequestType) -> QueryItems
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adopting the improved Networking V2

@@ -1,7 +1,7 @@
//
// DecodableHelper.swift
// HTTPURLResponse+Cookie.swift
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: github is mistaken here, not the same file at all

@federicocappelli federicocappelli marked this pull request as ready for review December 12, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant