Improve validity window

This commit is contained in:
Max Goedjen 2021-12-11 18:09:33 -08:00 committed by GitHub
parent 79f7177ffb
commit 86719e893b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -142,6 +142,7 @@ extension SecureEnclave {
public func persistAuthentication(secret: Secret, forDuration duration: TimeInterval) throws { public func persistAuthentication(secret: Secret, forDuration duration: TimeInterval) throws {
let newContext = LAContext() let newContext = LAContext()
newContext.touchIDAuthenticationAllowableReuseDuration = duration
newContext.localizedCancelTitle = "Deny" newContext.localizedCancelTitle = "Deny"
let formatter = DateComponentsFormatter() let formatter = DateComponentsFormatter()