Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fixing auth type process in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
soner-yuksel committed Aug 14, 2023
1 parent 3c40d11 commit 2843d78
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions Sources/Brave/Frontend/Settings/Tabs/PrivateTabsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ struct PrivateTabsView: View {
case .touchID:
return .touchID
default:
var error: NSError?
let policyEvaluation = context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error)

if policyEvaluation {
return .pinCode
} else {
if (error as? LAError)?.code == .passcodeNotSet {
return .noAuthentication
}
}
return .noAuthentication
}
}

var error: NSError?
let policyEvaluation = context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error)

if policyEvaluation {
return .pinCode
} else {
if (error as? LAError)?.code == .passcodeNotSet {
return .noAuthentication
}
}

Expand Down

0 comments on commit 2843d78

Please sign in to comment.