---
title: invalidate()
framework: localauthentication
role: symbol
role_heading: Instance Method
path: localauthentication/lacontext/invalidate()
---

# invalidate()

Invalidates the authentication context.

## Declaration

```swift
func invalidate()
```

## Discussion

Discussion Calling this method stops any pending policy evaluations, causing them to fail with the LAError.Code.appCancel error code. Once an authentication context has been invalidated, it cannot be used for policy evaluation. Invalidating a context that has been already invalidated has no effect.
