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 api v2 #3580

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

Conversation

federicocappelli
Copy link
Member

@federicocappelli federicocappelli commented Nov 21, 2024

Task/Issue URL: https://app.asana.com/0/1205842942115003/1207991044706236/f
Tech Design URL: https://app.asana.com/0/1205842942115003/1207991044706232/f
CC: @miasma13

iOS PR: duckduckgo/iOS#3480
BSK PR: duckduckgo/BrowserServicesKit#1033

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:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

# Conflicts:
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@federicocappelli federicocappelli changed the title Fcappelli/subscription oauth api v2 Subscription oauth api v2 Nov 22, 2024
Copy link
Contributor

github-actions bot commented Nov 26, 2024

Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS against a1bfa12

# Conflicts:
#	DuckDuckGo/UnifiedFeedbackForm/UnifiedFeedbackFormViewController.swift
# Conflicts:
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	DuckDuckGo/Application/AppDelegate.swift
#	DuckDuckGo/NavigationBar/View/MoreOptionsMenu.swift
#	DuckDuckGo/Subscription/SubscriptionManager+StandardConfiguration.swift
#	DuckDuckGo/UnifiedFeedbackForm/UnifiedFeedbackFormViewController.swift
#	DuckDuckGo/UnifiedFeedbackForm/UnifiedFeedbackFormViewModel.swift
#	LocalPackages/SubscriptionUI/Sources/SubscriptionUI/DebugMenu/SubscriptionDebugMenu.swift
#	LocalPackages/SubscriptionUI/Sources/SubscriptionUI/Preferences/PreferencesSubscriptionModel.swift
#	UnitTests/Freemium/DBP/Experiment/FreemiumDBPPixelExperimentManagingTests.swift
#	UnitTests/Freemium/DBP/FreemiumDBPFeatureTests.swift
#	UnitTests/Menus/MoreOptionsMenuTests.swift
#	UnitTests/Subscription/SubscriptionAppStoreRestorerTests.swift
#	UnitTests/Subscription/SubscriptionPagesUseSubscriptionFeatureForStripeTests.swift
#	UnitTests/Subscription/SubscriptionPagesUseSubscriptionFeatureTests.swift
#	UnitTests/UnifiedFeedbackForm/UnifiedFeedbackFormViewModelTests.swift
@THISISDINOSAUR
Copy link
Contributor

I'm still testing, but in case I run out of time before I'm out for the holidays want to report I'm struggling to get PIR working on this branch, initial scans never get off the starting block. Login item issues are common when flipping between multiple builds though, so it doesn't definitely mean it's broken. Is it working for you?

Screenshot 2024-12-13 at 4 15 42 PM

Copy link
Contributor

This PR has been inactive for more than 7 days and will be automatically closed 7 days from now.

Copy link
Contributor

github-actions bot commented Jan 1, 2025

This PR has been inactive for more than 7 days and will be automatically closed 7 days from now.

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	LocalPackages/NewTabPage/Sources/NewTabPage/RMF/NewTabPageRMFClient.swift
#	LocalPackages/SubscriptionUI/Sources/SubscriptionUI/Preferences/PreferencesSubscriptionModel.swift
@THISISDINOSAUR
Copy link
Contributor

Do I have to do anything special to test this? At the moment I can't see any privacy pro stuff

Screenshot 2025-01-08 at 6 40 42 PM Screenshot 2025-01-08 at 6 40 51 PM

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	DuckDuckGo/Menus/MainMenuActions.swift
#	DuckDuckGo/NavigationBar/View/MoreOptionsMenu.swift
#	DuckDuckGo/NavigationBar/View/NavigationBarViewController.swift
#	DuckDuckGo/Preferences/Model/PreferencesSection.swift
#	DuckDuckGo/Subscription/SubscriptionManager+StandardConfiguration.swift
#	DuckDuckGo/Tab/UserScripts/UserScripts.swift
#	DuckDuckGo/Waitlist/VPNFeatureGatekeeper.swift
#	DuckDuckGoDBPBackgroundAgent/DuckDuckGoDBPBackgroundAgentAppDelegate.swift
#	UnitTests/Subscription/SubscriptionPagesUseSubscriptionFeatureForStripeTests.swift
#	UnitTests/Subscription/SubscriptionPagesUseSubscriptionFeatureTests.swift
@diegoreymendez
Copy link
Contributor

Note: I've edited the description to add links to the related PRs for easy of navigation.

@diegoreymendez
Copy link
Contributor

I also cannot get the subscription enabled. I've tried restoring my subscription and the VPN shows me this:

Screenshot 2025-01-10 at 9 08 41 AM

@federicocappelli
Copy link
Member Author

@THISISDINOSAUR was able to recover and her UX triggered an improvement, @diegoreymendez confirmed, the last merge from main broke something in the VPN, I'm on it

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.

3 participants