@@ -62,8 +62,7 @@ class AuthenticationManager: Authentication {
6262 let isWPComMagicLinkPreferredToPassword = featureFlagService. isFeatureFlagEnabled ( . loginMagicLinkEmphasis)
6363 let isWPComMagicLinkShownAsSecondaryActionOnPasswordScreen = featureFlagService. isFeatureFlagEnabled ( . loginMagicLinkEmphasisM2)
6464 let isStoreCreationMVPEnabled = featureFlagService. isFeatureFlagEnabled ( . storeCreationMVP)
65- // TODO: Replace with A/B experiment
66- let enableSiteAddressLoginOnly = featureFlagService. isFeatureFlagEnabled ( . applicationPasswordAuthenticationForSiteCredentialLogin)
65+ let enableSiteAddressLoginOnly = ABTest . applicationPasswordAuthentication. variation == . treatment
6766 let configuration = WordPressAuthenticatorConfiguration ( wpcomClientId: ApiCredentials . dotcomAppId,
6867 wpcomSecret: ApiCredentials . dotcomSecret,
6968 wpcomScheme: ApiCredentials . dotcomAuthScheme,
@@ -342,8 +341,7 @@ extension AuthenticationManager: WordPressAuthenticatorDelegate {
342341 /// save the site to memory to check for jetpack requirement in epilogue
343342 currentSelfHostedSite = site
344343
345- // TODO: Replace with A/B experiment
346- let enableWPComOnlyForWPComSites = featureFlagService. isFeatureFlagEnabled ( . applicationPasswordAuthenticationForSiteCredentialLogin)
344+ let enableWPComOnlyForWPComSites = ABTest . applicationPasswordAuthentication. variation == . treatment
347345
348346 switch ( enableWPComOnlyForWPComSites, site. isWPCom) {
349347 case ( true , true ) , ( false , _) :
@@ -389,7 +387,7 @@ extension AuthenticationManager: WordPressAuthenticatorDelegate {
389387 /// If the user logged in with site credentials and application password feature flag is enabled,
390388 /// check if they can use the app and navigates to the home screen.
391389 if let siteCredentials = credentials. wporg,
392- featureFlagService . isFeatureFlagEnabled ( . applicationPasswordAuthenticationForSiteCredentialLogin ) {
390+ ABTest . applicationPasswordAuthentication . variation == . treatment {
393391 return didAuthenticateUser ( to: siteURL,
394392 with: siteCredentials,
395393 in: navigationController)
@@ -501,7 +499,7 @@ extension AuthenticationManager: WordPressAuthenticatorDelegate {
501499 ///
502500 func sync( credentials: AuthenticatorCredentials , onCompletion: @escaping ( ) -> Void ) {
503501 if let wporg = credentials. wporg,
504- featureFlagService . isFeatureFlagEnabled ( . applicationPasswordAuthenticationForSiteCredentialLogin ) {
502+ ABTest . applicationPasswordAuthentication . variation == . treatment {
505503 ServiceLocator . stores. authenticate ( credentials: . wporg( username: wporg. username,
506504 password: wporg. password,
507505 siteAddress: wporg. siteURL) )
0 commit comments