Skip to content

Commit

Permalink
Disable local auth
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoy committed Feb 21, 2024
1 parent ccb3627 commit 2054d2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DuckDuckGo/DeviceAuthentication/DeviceAuthenticator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ final class DeviceAuthenticator: UserAuthenticating {

func authenticateUser(reason: AuthenticationReason, result: @escaping (DeviceAuthenticationResult) -> Void) {
#if DEBUG || REVIEW
if ProcessInfo.processInfo.environment["UITEST_MODE"] == "1" {
// if ProcessInfo.processInfo.environment["UITEST_MODE"] == "1" {
result(.success)
return
}
// }
#endif
let needsAuthenticationForCreditCardsAutofill = reason == .autofillCreditCards && isCreditCardTimeIntervalExpired()

Check warning on line 161 in DuckDuckGo/DeviceAuthentication/DeviceAuthenticator.swift

View workflow job for this annotation

GitHub Actions / Sync End to end Tests

code after 'return' will never be executed
let needsAuthenticationForSyncSettings = reason == .syncSettings && isSyncSettingsTimeIntervalExpired()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ final class PasswordManagementViewController: NSViewController {
private func promptForAuthenticationIfNecessary() {
let authenticator = DeviceAuthenticator.shared
#if DEBUG || REVIEW
if ProcessInfo.processInfo.environment["UITEST_MODE"] == "1" {
// if ProcessInfo.processInfo.environment["UITEST_MODE"] == "1" {
toggleLockScreen(hidden: true)
return
}
// }
#endif
toggleLockScreen(hidden: !authenticator.requiresAuthentication)

Expand Down

0 comments on commit 2054d2b

Please sign in to comment.