Contents

ASAuthorizationController

A controller that manages authorization requests that a provider creates.

Declaration

class ASAuthorizationController

Mentioned in

Overview

Create authorization requests for the credential types your app supports, such as ASAuthorizationAppleIDRequest for Sign in with Apple, or ASAuthorizationPasswordRequest for password credentials. Create an authorization controller using init(authorizationRequests:), supplying the authorization requests you create. Set the authorization controller’s delegate to receive responses when requests succeed or fail, and set its presentationContextProvider so that the authorization controller can present UI.

Call performAutoFillAssistedRequests() to present inline UI to request credentials, or performRequests() or performRequests(options:) to request credentials using modal UI. ASAuthorizationController calls your delegate’s methods when the request completes.

Set the content type of text fields in your app’s login UI so that ASAuthorizationController can detect when to offer AutoFill suggestions. Use username as the content type for user name text fields, and password for password fields.

Topics

Creating a controller

Inspecting requests

Presenting requests

Executing requests

Responding to request completion

See Also

Authorization requests