@@ -54,12 +54,14 @@ class AuthenticationManager: Authentication {
5454 let isWPComMagicLinkShownAsSecondaryActionOnPasswordScreen = ServiceLocator . featureFlagService. isFeatureFlagEnabled ( . loginMagicLinkEmphasisM2)
5555 let isFeatureCarouselShown = ServiceLocator . featureFlagService. isFeatureFlagEnabled ( . loginPrologueOnboarding) == false
5656 || loggedOutAppSettings. hasFinishedOnboarding == true
57+ let isSimplifiedLoginI1Enabled = ServiceLocator . featureFlagService. isFeatureFlagEnabled ( . simplifiedLoginFlowI1)
58+ let isStoreCreationMVPEnabled = ServiceLocator . featureFlagService. isFeatureFlagEnabled ( . storeCreationMVP)
5759 let configuration = WordPressAuthenticatorConfiguration ( wpcomClientId: ApiCredentials . dotcomAppId,
5860 wpcomSecret: ApiCredentials . dotcomSecret,
5961 wpcomScheme: ApiCredentials . dotcomAuthScheme,
6062 wpcomTermsOfServiceURL: WooConstants . URLs. termsOfService. rawValue,
6163 wpcomAPIBaseURL: Settings . wordpressApiBaseURL,
62- whatIsWPComURL: WooConstants . URLs. whatIsWPCom. rawValue,
64+ whatIsWPComURL: isSimplifiedLoginI1Enabled ? nil : WooConstants . URLs. whatIsWPCom. rawValue,
6365 googleLoginClientId: ApiCredentials . googleClientId,
6466 googleLoginServerClientId: ApiCredentials . googleServerId,
6567 googleLoginScheme: ApiCredentials . googleAuthScheme,
@@ -74,7 +76,13 @@ class AuthenticationManager: Authentication {
7476 isWPComLoginRequiredForSiteCredentialsLogin: true ,
7577 isWPComMagicLinkPreferredToPassword: isWPComMagicLinkPreferredToPassword,
7678 isWPComMagicLinkShownAsSecondaryActionOnPasswordScreen:
77- isWPComMagicLinkShownAsSecondaryActionOnPasswordScreen)
79+ isWPComMagicLinkShownAsSecondaryActionOnPasswordScreen,
80+ enableWPComLoginOnlyInPrologue: isSimplifiedLoginI1Enabled,
81+ enableSiteCreation: isStoreCreationMVPEnabled,
82+ enableSocialLogin: !isSimplifiedLoginI1Enabled,
83+ emphasizeEmailForWPComPassword: isSimplifiedLoginI1Enabled,
84+ wpcomPasswordInstructions: isSimplifiedLoginI1Enabled ?
85+ AuthenticationConstants . wpcomPasswordInstructions : nil )
7886
7987 let systemGray3LightModeColor = UIColor ( red: 199 / 255.0 , green: 199 / 255.0 , blue: 204 / 255.0 , alpha: 1 )
8088 let systemLabelLightModeColor = UIColor ( red: 0 , green: 0 , blue: 0 , alpha: 1 )
@@ -108,22 +116,34 @@ class AuthenticationManager: Authentication {
108116 LoginPrologueViewController ( isFeatureCarouselShown: isFeatureCarouselShown) ,
109117 statusBarStyle: . default)
110118
119+ let getStartedInstructions = isSimplifiedLoginI1Enabled ?
120+ AuthenticationConstants . getStartedInstructionsForSimplifiedLogin :
121+ AuthenticationConstants . getStartedInstructions
122+
123+ let continueWithWPButtonTitle = isSimplifiedLoginI1Enabled ?
124+ AuthenticationConstants . loginButtonTitle :
125+ AuthenticationConstants . continueWithWPButtonTitle
126+
127+ let emailAddressPlaceholder = isSimplifiedLoginI1Enabled ?
128+ 129+ WordPressAuthenticatorDisplayStrings . defaultStrings. emailAddressPlaceholder
130+
111131 let displayStrings = WordPressAuthenticatorDisplayStrings ( emailLoginInstructions: AuthenticationConstants . emailInstructions,
112- getStartedInstructions: isWPComSignupEnabled ?
113- AuthenticationConstants . getStartedInstructionsWithWPComSignupEnabled:
114- AuthenticationConstants . getStartedInstructions,
132+ getStartedInstructions: getStartedInstructions,
115133 jetpackLoginInstructions: AuthenticationConstants . jetpackInstructions,
116134 siteLoginInstructions: AuthenticationConstants . siteInstructions,
117135 siteCredentialInstructions: AuthenticationConstants . siteCredentialInstructions,
118136 usernamePasswordInstructions: AuthenticationConstants . usernamePasswordInstructions,
119137 applePasswordInstructions: AuthenticationConstants . applePasswordInstructions,
120- continueWithWPButtonTitle: AuthenticationConstants . continueWithWPButtonTitle,
138+ continueWithWPButtonTitle: continueWithWPButtonTitle,
121139 enterYourSiteAddressButtonTitle: AuthenticationConstants . enterYourSiteAddressButtonTitle,
122140 signInWithSiteCredentialsButtonTitle: AuthenticationConstants . signInWithSiteCredsButtonTitle,
123141 findSiteButtonTitle: AuthenticationConstants . findYourStoreAddressButtonTitle,
124142 signupTermsOfService: AuthenticationConstants . signupTermsOfService,
125143 whatIsWPComLinkTitle: AuthenticationConstants . whatIsWPComLinkTitle,
126- getStartedTitle: AuthenticationConstants . loginTitle)
144+ siteCreationButtonTitle: AuthenticationConstants . createSiteButtonTitle,
145+ getStartedTitle: AuthenticationConstants . loginTitle,
146+ emailAddressPlaceholder: emailAddressPlaceholder)
127147
128148 let unifiedStyle = WordPressAuthenticatorUnifiedStyle ( borderColor: . divider,
129149 errorColor: . error,
@@ -516,6 +536,12 @@ extension AuthenticationManager: WordPressAuthenticatorDelegate {
516536 }
517537 ServiceLocator . analytics. track ( wooEvent, withError: error)
518538 }
539+
540+ // Navigate to store creation
541+ func showSiteCreation( in navigationController: UINavigationController ) {
542+ // TODO: add tracks
543+ // Navigate to store creation
544+ }
519545}
520546
521547// MARK: - Local notifications
0 commit comments