A credential that results from a successful Apple ID authentication.


class ASAuthorizationAppleIDCredential : NSObject


Identifying a User

var identityToken: Data?

A JSON Web Token (JWT) that securely communicates information about the user to your app.

var authorizationCode: Data?

A short-lived token used by your app for proof of authorization when interacting with the app’s server counterpart.

var state: String?

An arbitrary string that your app provided to the request that generated the credential.

var user: String

An identifier associated with the authenticated user.

Getting Contact Information

var authorizedScopes: [ASAuthorization.Scope]

The contact information the user authorized your app to access.

var email: String?

The user’s email address.

Detecting User Characteristics

var realUserStatus: ASUserDetectionStatus

A value that indicates whether the user appears to be a real person.

enum ASUserDetectionStatus

Possible values for the real user indicator.

See Also

Sign In with Apple

Implementing User Authentication with Sign in with Apple

Provide a way for users of your app to set up an account and start using your services.

Sign in with Apple Entitlement

An entitlement that lets your app use Sign in with Apple.

class ASAuthorizationAppleIDProvider

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

class ASAuthorizationController

A controller that manages authorization requests created by a provider.