---
title: AuthorizationController
framework: authenticationservices
role: symbol
role_heading: Structure
path: authenticationservices/authorizationcontroller
---

# AuthorizationController

A SwiftUI environment value that views use to perform authorization requests.

## Declaration

```swift
@MainActor struct AuthorizationController
```

## Overview

Overview To access an instance of this type, use the SwiftUI Environment property wrapper and specify authorizationController as the environment value, as the following example shows: struct AuthorizationControllerExample: View {     // Get an instance of AuthorizationController using SwiftUI's @Environment      // property wrapper.     @Environment(\.authorizationController) private var authorizationController

var body: some View {         Button("Sign In") {             Task {                 do {                     // Create the authorization request.                     async let request = makeAuthorizationRequest()                     // Perform the request and await its result.                     let result = try await authorizationController                         .performRequest(request)                     switch result {                         // Process the request's result.                     }                 } catch {                     // Respond to any authorization errors.                 }             }         }     } }

## Topics

### Performing requests

- [performRequest(_:)](authenticationservices/authorizationcontroller/performrequest(_:).md)
- [performRequests(_:)](authenticationservices/authorizationcontroller/performrequests(_:).md)
- [performRequest(_:options:)](authenticationservices/authorizationcontroller/performrequest(_:options:).md)
- [performRequests(_:options:)](authenticationservices/authorizationcontroller/performrequests(_:options:).md)
- [performRequest(_:customMethods:)](authenticationservices/authorizationcontroller/performrequest(_:custommethods:).md)
- [performRequests(_:customMethods:)](authenticationservices/authorizationcontroller/performrequests(_:custommethods:).md)

### Performing assisted requests

- [performAutoFillAssistedRequest(_:)](authenticationservices/authorizationcontroller/performautofillassistedrequest(_:).md)
- [performAutoFillAssistedRequests(_:)](authenticationservices/authorizationcontroller/performautofillassistedrequests(_:).md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Authorization requests

- [ASAuthorizationController](authenticationservices/asauthorizationcontroller.md)
- [ASAuthorizationResult](authenticationservices/asauthorizationresult.md)
