@@ -73,6 +73,7 @@ final class AppCoordinator {
7373 self . displayLoggedInStateWithoutDefaultStore ( )
7474 case ( true , false ) :
7575 self . validateRoleEligibility {
76+ self . configureAuthenticator ( )
7677 self . displayLoggedInUI ( )
7778 self . synchronizeAndShowWhatsNew ( )
7879 }
@@ -142,8 +143,8 @@ private extension AppCoordinator {
142143
143144 /// Configures the WPAuthenticator and sets the authenticator UI as the window's root view.
144145 func configureAndDisplayAuthenticator( ) {
145- authenticationManager . initialize ( )
146- appleIDCredentialChecker . observeLoggedInStateForAppleIDObservations ( )
146+ configureAuthenticator ( )
147+
147148 let authenticationUI = authenticationManager. authenticationUI ( )
148149 setWindowRootViewControllerAndAnimateIfNeeded ( authenticationUI) { [ weak self] _ in
149150 guard let self = self else { return }
@@ -152,6 +153,12 @@ private extension AppCoordinator {
152153 ServiceLocator . analytics. track ( . openedLogin, withProperties: [ " prologue_experiment_variant " : ABTest . loginPrologueButtonOrder. variation. analyticsValue] )
153154 }
154155
156+ /// Configures the WPAuthenticator for usage in both logged-in and logged-out states.
157+ func configureAuthenticator( ) {
158+ authenticationManager. initialize ( )
159+ appleIDCredentialChecker. observeLoggedInStateForAppleIDObservations ( )
160+ }
161+
155162 /// Determines whether the login onboarding should be shown.
156163 func canPresentLoginOnboarding( ) -> Bool {
157164 // Since we cannot control the user defaults in the simulator where UI tests are run on,
@@ -209,6 +216,8 @@ private extension AppCoordinator {
209216 return
210217 }
211218
219+ configureAuthenticator ( )
220+
212221 let matcher = ULAccountMatcher ( storageManager: storageManager)
213222 matcher. refreshStoredSites ( )
214223
0 commit comments