Versions in this module Expand all Collapse all v0 v0.1.0 Aug 30, 2026 Changes in this version + var ErrAppCancel = errors.New("localauthentication: cancelled by the application") + var ErrAuthenticationFailed = errors.New("localauthentication: authentication failed") + var ErrBiometryDisconnected = errors.New("localauthentication: the biometric accessory is disconnected") + var ErrBiometryLockout = errors.New("localauthentication: biometry is locked out after too many failed attempts") + var ErrBiometryNotAvailable = errors.New("localauthentication: biometry is not available") + var ErrBiometryNotEnrolled = errors.New("localauthentication: biometry has no enrolled identity") + var ErrBiometryNotPaired = errors.New("localauthentication: the biometric accessory is not paired") + var ErrCompanionNotAvailable = errors.New("localauthentication: no companion device is available") + var ErrEmptyReason = errors.New("localauthentication: a localized reason is required") + var ErrInvalidContext = errors.New("localauthentication: the authentication context is invalid") + var ErrInvalidDimensions = errors.New("localauthentication: invalid embedded UI dimensions") + var ErrInvalidPolicy = errors.New("localauthentication: unknown policy") + var ErrNotBundled = errors.New(...) + var ErrNotInteractive = errors.New("localauthentication: interaction is not allowed") + var ErrPasscodeNotSet = errors.New("localauthentication: no device passcode is set") + var ErrSystemCancel = errors.New("localauthentication: cancelled by the system") + var ErrUnavailable = errors.New("localauthentication: the LocalAuthentication framework is not available") + var ErrUnsupported = errors.New("localauthentication: unsupported on this platform (macOS only)") + var ErrUserCancel = errors.New("localauthentication: cancelled by the user") + var ErrUserFallback = errors.New("localauthentication: the user asked to fall back to a password") + func Available(policy Policy) error + func Evaluate(ctx context.Context, policy Policy, reason string, opts ...Option) error + func Gate(ctx context.Context, policy Policy, reason string, opts ...Option) error + type BiometryType int + const BiometryFaceID + const BiometryNone + const BiometryOpticID + const BiometryTouchID + func Biometry() (BiometryType, error) + func (b BiometryType) String() string + type Error struct + Code int + Message string + Op string + Unbundled bool + func (e *Error) Error() string + func (e *Error) Unwrap() []error + type Option func(*options) + func WithCancelTitle(title string) Option + func WithFallbackTitle(title string) Option + func WithoutInteraction() Option + type Policy int + const PolicyBiometrics + const PolicyOwner + func (p Policy) String() string