diff --git a/DuckDuckGo/AutofillLoginDetailsViewController.swift b/DuckDuckGo/AutofillLoginDetailsViewController.swift index 4a2328481f..58f614a72d 100644 --- a/DuckDuckGo/AutofillLoginDetailsViewController.swift +++ b/DuckDuckGo/AutofillLoginDetailsViewController.swift @@ -109,7 +109,7 @@ class AutofillLoginDetailsViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - if !authenticationNotRequired { + if !authenticationNotRequired && authenticator.state == .loggedIn { authenticator.authenticate() } } diff --git a/DuckDuckGo/AutofillLoginSettingsListViewController.swift b/DuckDuckGo/AutofillLoginSettingsListViewController.swift index b7d1664b4d..92a59444ca 100644 --- a/DuckDuckGo/AutofillLoginSettingsListViewController.swift +++ b/DuckDuckGo/AutofillLoginSettingsListViewController.swift @@ -149,7 +149,7 @@ final class AutofillLoginSettingsListViewController: UIViewController { override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) - if viewModel.authenticator.canAuthenticate() { + if viewModel.authenticator.canAuthenticate() && viewModel.authenticator.state == .loggedIn { AppDependencyProvider.shared.autofillLoginSession.startSession() } }