---
title: "authorize(localizedReason:in:completion:)"
framework: localauthentication
role: symbol
role_heading: Instance Method
path: "localauthentication/laright/authorize(localizedreason:in:completion:)"
---

# authorize(localizedReason:in:completion:)

Performs an authorization on the right with a window context you supply.

## Declaration

```swift
func authorize(localizedReason: String, in presentationContext: LAPresentationContext, completion handler: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func authorize(localizedReason: String, in presentationContext: LAPresentationContext) async throws
```

## Discussion

Discussion important: You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration: func authorize(localizedReason: String, in presentationContext: LAPresentationContext) async throws For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.

## See Also

### Authorizing a right

- [init()](localauthentication/laright/init().md)
- [init(requirement:)](localauthentication/laright/init(requirement:).md)
- [tag](localauthentication/laright/tag.md)
- [authorize(localizedReason:completion:)](localauthentication/laright/authorize(localizedreason:completion:).md)
