From 4fe5203a7e7de09fd2d00802fa0cb10660a1aaa7 Mon Sep 17 00:00:00 2001 From: amddg44 Date: Mon, 11 Sep 2023 15:30:43 +0200 Subject: [PATCH] Update Login details auth state check to be in line with the main Login screen (#2002) Task/Issue URL: https://app.asana.com/0/0/1205463416606385/f Tech Design URL: CC: Description: Applies same authentication logic check to the details screen as to it's parent --- DuckDuckGo/AutofillLoginDetailsViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DuckDuckGo/AutofillLoginDetailsViewController.swift b/DuckDuckGo/AutofillLoginDetailsViewController.swift index 58f614a72d..8fb83a6826 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 && authenticator.state == .loggedIn { + if !authenticationNotRequired { authenticator.authenticate() } } @@ -118,7 +118,7 @@ class AutofillLoginDetailsViewController: UIViewController { super.viewWillDisappear(animated) if isMovingFromParent { AppDependencyProvider.shared.autofillLoginSession.lastAccessedAccount = nil - } else if authenticator.canAuthenticate() { + } else if authenticator.canAuthenticate() && authenticator.state == .loggedIn { AppDependencyProvider.shared.autofillLoginSession.startSession() } }