---
title: ASAuthorizationAppleIDProvider
framework: authenticationservices
role: symbol
role_heading: Class
path: authenticationservices/asauthorizationappleidprovider
---

# ASAuthorizationAppleIDProvider

A mechanism for generating requests to authenticate users based on their Apple ID.

## Declaration

```swift
class ASAuthorizationAppleIDProvider
```

## Overview

Overview You use a provider to create a request (ASAuthorizationAppleIDRequest), which you then use to initialize a controller (ASAuthorizationController) that performs the request: let provider = ASAuthorizationAppleIDProvider() let request = provider.createRequest() let controller = ASAuthorizationController(authorizationRequests: [request]) On success, the controller’s delegate receives an authorization (ASAuthorization) containing a credential (ASAuthorizationAppleIDCredential) that has an opaque user identifier. You can use that identifier to later check the user’s credential state—for example, to see if authorization has been revoked—by calling the getCredentialState(forUserID:completion:) method: let user = authorization.credential.user provider.getCredentialState(forUserID: user) { state, error in     // Check for error and examine the state. }

## Topics

### Offering Sign In with Apple

- [ASAuthorizationAppleIDButton](authenticationservices/asauthorizationappleidbutton.md)
- [WKInterfaceAuthorizationAppleIDButton](watchkit/wkinterfaceauthorizationappleidbutton.md)

### Creating Requests

- [createRequest()](authenticationservices/asauthorizationappleidprovider/createrequest().md)
- [ASAuthorizationAppleIDRequest](authenticationservices/asauthorizationappleidrequest.md)
- [ASAuthorizationOpenIDRequest](authenticationservices/asauthorizationopenidrequest.md)

### Getting State

- [getCredentialState(forUserID:completion:)](authenticationservices/asauthorizationappleidprovider/getcredentialstate(foruserid:completion:).md)
- [ASAuthorizationAppleIDProvider.CredentialState](authenticationservices/asauthorizationappleidprovider/credentialstate.md)
- [credentialRevokedNotification](authenticationservices/asauthorizationappleidprovider/credentialrevokednotification.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [ASAuthorizationProvider](authenticationservices/asauthorizationprovider.md)
- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Sign In with Apple

- [Implementing User Authentication with Sign in with Apple](authenticationservices/implementing-user-authentication-with-sign-in-with-apple.md)
- [Simplifying User Authentication in a tvOS App](authenticationservices/simplifying-user-authentication-in-a-tvos-app.md)
- [SignInWithAppleButton](authenticationservices/signinwithapplebutton.md)
- [Sign in with Apple Entitlement](bundleresources/entitlements/com.apple.developer.applesignin.md)
- [ASAuthorizationAppleIDCredential](authenticationservices/asauthorizationappleidcredential.md)
