Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Experiments/Experiments/DefaultFeatureFlagService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions Experiments/Experiments/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 14 additions & 26 deletions WooCommerce/Classes/Authentication/AuthenticationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
Expand Down Expand Up @@ -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)
}
}

Expand Down Expand Up @@ -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.
Expand Down