<!--
{
  "availability" : [
    "iOS: 16.4.0 -",
    "iPadOS: 16.4.0 -",
    "macCatalyst: 16.4.0 -",
    "macOS: 13.3.0 -",
    "tvOS: 16.4.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/AuthorizationController",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Authentication Services",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:31_AuthenticationServices_SwiftUI23AuthorizationControllerV"
  },
  "title" : "AuthorizationController"
}
-->

# AuthorizationController

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

```
@MainActor struct AuthorizationController
```

## Overview

To access an instance of this type, use the SwiftUI <doc://com.apple.documentation/documentation/SwiftUI/Environment> property wrapper and specify <doc://com.apple.documentation/documentation/SwiftUI/EnvironmentValues/authorizationController> as the environment value, as the following example shows:

```swift
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(_:)`](/documentation/AuthenticationServices/AuthorizationController/performRequest(_:))

Performs the specified authorization request.

[`performRequests(_:)`](/documentation/AuthenticationServices/AuthorizationController/performRequests(_:))

Performs an authorization request from the provided array.

[`performRequest(_:options:)`](/documentation/AuthenticationServices/AuthorizationController/performRequest(_:options:))

Performs the specified authorization request with explicit options.

[`performRequests(_:options:)`](/documentation/AuthenticationServices/AuthorizationController/performRequests(_:options:))

Performs an authorization request, with explicit options, from the provided array.

[`performRequest(_:customMethods:)`](/documentation/AuthenticationServices/AuthorizationController/performRequest(_:customMethods:))

Performs the authorization request using a custom authorization method.

[`performRequests(_:customMethods:)`](/documentation/AuthenticationServices/AuthorizationController/performRequests(_:customMethods:))

Performs an authorization request from the provided array using a custom authorization method.

### Performing assisted requests

[`performAutoFillAssistedRequest(_:)`](/documentation/AuthenticationServices/AuthorizationController/performAutoFillAssistedRequest(_:))

Performs an AutoFill-assisted authorization request.

[`performAutoFillAssistedRequests(_:)`](/documentation/AuthenticationServices/AuthorizationController/performAutoFillAssistedRequests(_:))

Performs an AutoFill-assisted authorization request from the provided array.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)