---
title: LAContext
framework: localauthentication
role: symbol
role_heading: Class
path: localauthentication/lacontext
---

# LAContext

A mechanism for evaluating authentication policies and access controls.

## Declaration

```swift
class LAContext
```

## Overview

Overview You use an authentication context to evaluate the user’s identity, either with biometrics like Touch ID or Face ID, or by supplying the device passcode. The context handles user interaction, and also interfaces to the Secure Enclave, the underlying hardware element that manages biometric data. You create and configure the context, and ask it to carry out the authentication. You then receive an asynchronous callback, which provides an indication of authentication success or failure, and an error instance that explains the reason for a failure, if any. important: Include the NSFaceIDUsageDescription key in your app’s Info.plist file if your app allows biometric authentication. Otherwise, authorization requests may fail.

## Topics

### Checking availability

- [canEvaluatePolicy(_:error:)](localauthentication/lacontext/canevaluatepolicy(_:error:).md)
- [LAPolicy](localauthentication/lapolicy.md)
- [biometryType](localauthentication/lacontext/biometrytype.md)
- [LABiometryType](localauthentication/labiometrytype.md)

### Evaluating authentication policies

- [evaluatePolicy(_:localizedReason:reply:)](localauthentication/lacontext/evaluatepolicy(_:localizedreason:reply:).md)
- [evaluatedPolicyDomainState](localauthentication/lacontext/evaluatedpolicydomainstate.md)
- [maxBiometryFailures](localauthentication/lacontext/maxbiometryfailures.md)

### Evaluating access controls

- [evaluateAccessControl(_:operation:localizedReason:reply:)](localauthentication/lacontext/evaluateaccesscontrol(_:operation:localizedreason:reply:).md)
- [LAAccessControlOperation](localauthentication/laaccesscontroloperation.md)
- [interactionNotAllowed](localauthentication/lacontext/interactionnotallowed.md)

### Customizing authentication prompts

- [localizedReason](localauthentication/lacontext/localizedreason.md)
- [localizedFallbackTitle](localauthentication/lacontext/localizedfallbacktitle.md)
- [localizedCancelTitle](localauthentication/lacontext/localizedcanceltitle.md)

### Reusing device unlock state

- [touchIDAuthenticationAllowableReuseDuration](localauthentication/lacontext/touchidauthenticationallowablereuseduration.md)
- [LATouchIDAuthenticationMaximumAllowableReuseDuration](localauthentication/latouchidauthenticationmaximumallowablereuseduration.md)

### Managing credentials

- [setCredential(_:type:)](localauthentication/lacontext/setcredential(_:type:).md)
- [isCredentialSet(_:)](localauthentication/lacontext/iscredentialset(_:).md)
- [LACredentialType](localauthentication/lacredentialtype.md)

### Invalidating the authentication context

- [invalidate()](localauthentication/lacontext/invalidate().md)

### Instance Properties

- [domainState](localauthentication/lacontext/domainstate.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Observable](observation/observable.md)
- [ObservableObject](combine/observableobject.md)

## See Also

### Authentication and access

- [LARight](localauthentication/laright.md)
- [LARight.State](localauthentication/laright/state-swift.enum.md)
