File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ class AuthenticationManager: Authentication {
6565
6666 private let userDefaults : UserDefaults
6767
68+ private var initialized : Bool = false
69+
6870 init ( stores: StoresManager = ServiceLocator . stores,
6971 storageManager: StorageManagerType = ServiceLocator . storageManager,
7072 featureFlagService: FeatureFlagService = ServiceLocator . featureFlagService,
@@ -84,6 +86,8 @@ class AuthenticationManager: Authentication {
8486 /// Initializes the WordPress Authenticator.
8587 ///
8688 func initialize( ) {
89+ guard !initialized else { return }
90+ initialized = true
8791 WordPressAuthenticator . initializeWithCustomConfigs ( )
8892 WordPressAuthenticator . shared. delegate = self
8993 }
Original file line number Diff line number Diff line change @@ -238,6 +238,7 @@ private extension AppCoordinator {
238238
239239 /// Configures the WPAuthenticator for usage in both logged-in and logged-out states.
240240 func configureAuthenticator( ) {
241+ authenticationManager. initialize ( )
241242 authenticationManager. setLoggedOutAppSettings ( loggedOutAppSettings)
242243 authenticationManager. displayAuthenticatorIfLoggedOut = { [ weak self] in
243244 guard let self, self . isLoggedIn == false else { return nil }
You can’t perform that action at this time.
0 commit comments