Skip to content

Commit

Permalink
Update Login details auth state check to be in line with the main Log…
Browse files Browse the repository at this point in the history
…in 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
  • Loading branch information
amddg44 authored Sep 11, 2023
1 parent 7eb7617 commit 4fe5203
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DuckDuckGo/AutofillLoginDetailsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class AutofillLoginDetailsViewController: UIViewController {

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
if !authenticationNotRequired && authenticator.state == .loggedIn {
if !authenticationNotRequired {
authenticator.authenticate()
}
}
Expand All @@ -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()
}
}
Expand Down

0 comments on commit 4fe5203

Please sign in to comment.