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

# authorize(localizedReason:completion:)

Performs an authorization on the right.

## Declaration

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

```swift
func authorize(localizedReason: String) async throws
```

## Parameters

- `localizedReason`: A reason for the authorization that the system displays to the user.
- `handler`: A completion handler called at the end of the authorization process.

## 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) 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:in:completion:)](localauthentication/laright/authorize(localizedreason:in:completion:).md)
