|
|
@ -343,10 +343,8 @@ import LocalAuthentication
|
|
|
|
private func screenLockContext() -> LAContext {
|
|
|
|
private func screenLockContext() -> LAContext {
|
|
|
|
let context = LAContext()
|
|
|
|
let context = LAContext()
|
|
|
|
|
|
|
|
|
|
|
|
// If user has set any non-zero timeout, recycle biometric auth
|
|
|
|
// Never re-use recent biometric auth.
|
|
|
|
// in the same period as our normal screen lock timeout, up to
|
|
|
|
context.touchIDAuthenticationAllowableReuseDuration = TimeInterval(0)
|
|
|
|
// max of 10 seconds.
|
|
|
|
|
|
|
|
context.touchIDAuthenticationAllowableReuseDuration = TimeInterval(min(10.0, screenLockTimeout()))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if #available(iOS 11.0, *) {
|
|
|
|
if #available(iOS 11.0, *) {
|
|
|
|
assert(!context.interactionNotAllowed)
|
|
|
|
assert(!context.interactionNotAllowed)
|
|
|
|