Skip to content

Relax policy requirements on iOS to deviceOwnerAuthentication #36

@lucasloisp

Description

@lucasloisp

Summary

The isAvailable method in the iOS implementation currently relies on biometricType being distinct from none

if LAContext().biometricType == .none {
throw BiometricException()
}

Which requires a policy of deviceOwnerAuthenticationWithBiometrics

guard self.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error) else {

This has come up in #30 (closed by the reporting user) and is tangentially related to #27.

Context

An application I am currently working on would like to support passkeys without requiring faceID/touchID to be set up, falling back to passcodes.

Proposal

Because I understand some applications may want to retain "biometrics" as a hard requirement, and in order to avoid a breaking change, I would like to propose this policy level is made configurable.

@peterferguson, given also your position on #27 (which I agree with), would you be open to a PR making this requirement configurable, so some applications can opt for the more lenient policy of deviceOwnerAuthentication over deviceOwnerAuthenticationWithBiometrics?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions