---
title: authorizationController
framework: swiftui
role: symbol
role_heading: Instance Property
path: swiftui/environmentvalues/authorizationcontroller
---

# authorizationController

A value provided in the SwiftUI environment that views can use to perform authorization requests.

## Declaration

```swift
var authorizationController: AuthorizationController { get }
```

## Discussion

Discussion For example, you can perform authorization requests when the user taps a button: struct AuthorizationControllerExample: View {     @Environment(\.authorizationController) private var authorizationController

var body: some View {         Button("Sign In") {             Task {                 do {                     async let requests = authorizationRequests() // defined elsewhere                     let result = try await authorizationController                         .performRequests(requests)

switch result {                     // code to handle the authorization result                     }                 } catch {                     // code to handle the authorization error                 }             }         }     } }

## See Also

### Authorizing and authenticating

- [LocalAuthenticationView](localauthentication/localauthenticationview.md)
- [SignInWithAppleButton](authenticationservices/signinwithapplebutton.md)
- [signInWithAppleButtonStyle(_:)](swiftui/view/signinwithapplebuttonstyle(_:).md)
- [webAuthenticationSession](swiftui/environmentvalues/webauthenticationsession.md)
