From d399c0f1bc6aeca2bdafd2583e6d1a0e6954b1cf Mon Sep 17 00:00:00 2001 From: Jaclyn Chen Date: Mon, 7 Nov 2022 15:14:51 +0800 Subject: [PATCH] Remove unused `wpcomSignup` feature flag that is replaced by native account creation. --- .../DefaultFeatureFlagService.swift | 2 - Experiments/Experiments/FeatureFlag.swift | 4 -- .../AuthenticationManager.swift | 40 +++++++------------ 3 files changed, 14 insertions(+), 32 deletions(-) diff --git a/Experiments/Experiments/DefaultFeatureFlagService.swift b/Experiments/Experiments/DefaultFeatureFlagService.swift index f3730788ee4..2a319aca117 100644 --- a/Experiments/Experiments/DefaultFeatureFlagService.swift +++ b/Experiments/Experiments/DefaultFeatureFlagService.swift @@ -33,8 +33,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService { return true case .searchProductsBySKU: return true - case .wpcomSignup: - return false case .inAppPurchases: return buildConfig == .localDeveloper || buildConfig == .alpha case .storeCreationMVP: diff --git a/Experiments/Experiments/FeatureFlag.swift b/Experiments/Experiments/FeatureFlag.swift index 6951733ac86..6fe1638265a 100644 --- a/Experiments/Experiments/FeatureFlag.swift +++ b/Experiments/Experiments/FeatureFlag.swift @@ -70,10 +70,6 @@ public enum FeatureFlag: Int { /// case searchProductsBySKU - /// Enables signing up for a WP.com account. - /// - case wpcomSignup - /// Enables In-app purchases for buying Hosted WooCommerce plans /// case inAppPurchases diff --git a/WooCommerce/Classes/Authentication/AuthenticationManager.swift b/WooCommerce/Classes/Authentication/AuthenticationManager.swift index dc266e099f0..ba095e8984a 100644 --- a/WooCommerce/Classes/Authentication/AuthenticationManager.swift +++ b/WooCommerce/Classes/Authentication/AuthenticationManager.swift @@ -41,13 +41,9 @@ class AuthenticationManager: Authentication { /// private let storageManager: StorageManagerType - /// Whether WP.com signup is enabled in the authentication flow based on the feature flag. - private let isWPComSignupEnabled: Bool - init(storageManager: StorageManagerType = ServiceLocator.storageManager, featureFlagService: FeatureFlagService = ServiceLocator.featureFlagService) { self.storageManager = storageManager - self.isWPComSignupEnabled = featureFlagService.isFeatureFlagEnabled(.wpcomSignup) } /// Initializes the WordPress Authenticator. @@ -68,7 +64,7 @@ class AuthenticationManager: Authentication { googleLoginScheme: ApiCredentials.googleAuthScheme, userAgent: UserAgent.defaultUserAgent, showLoginOptions: true, - enableSignUp: isWPComSignupEnabled, + enableSignUp: false, enableSignInWithApple: true, enableSignupWithGoogle: false, enableUnifiedAuth: true, @@ -402,27 +398,19 @@ extension AuthenticationManager: WordPressAuthenticatorDelegate { /// Presents the Signup Epilogue, in the specified NavigationController. /// func presentSignupEpilogue(in navigationController: UINavigationController, for credentials: AuthenticatorCredentials, service: SocialService?) { - if isWPComSignupEnabled { - // A proper signup epilogue flow will be added incrementally later as part of the WP.com signup experiment: - // Ref: pe5sF9-xP-p2 - sync(credentials: credentials) { [weak self] in - self?.startStorePicker(in: navigationController) - } - } else { - // NO-OP: The current WC version does not support Signup. Let SIWA through. - guard case .apple = service else { - return - } + // NO-OP: The current WC version does not support Signup. Let SIWA through. + guard case .apple = service else { + return + } - // For SIWA, signups are treating like signing in for now. - // Signup code in Authenticator normally synchronizes the auth credentials but - // since we're hacking in SIWA, that's never called in the pod. Call here so the - // person's name and user ID show up on the picker screen. - // - // This is effectively a useless screen for them other than telling them to install Jetpack. - sync(credentials: credentials) { [weak self] in - self?.startStorePicker(in: navigationController) - } + // For SIWA, signups are treating like signing in for now. + // Signup code in Authenticator normally synchronizes the auth credentials but + // since we're hacking in SIWA, that's never called in the pod. Call here so the + // person's name and user ID show up on the picker screen. + // + // This is effectively a useless screen for them other than telling them to install Jetpack. + sync(credentials: credentials) { [weak self] in + self?.startStorePicker(in: navigationController) } } @@ -480,7 +468,7 @@ extension AuthenticationManager: WordPressAuthenticatorDelegate { /// Note: As of now, this is a NO-OP, we're not supporting any signup flows. /// func shouldPresentSignupEpilogue() -> Bool { - isWPComSignupEnabled + false } /// Synchronizes the specified WordPress Account.