The Apple ID authentication provider allows users to log in with their Apple ID credentials through Sign in with Apple. This authentication method uses the industry-standard OAuth 2.0 authorization protocol.
When a user successfully logs in through Sign in with Apple, Apple returns a credential object that includes a JSON Web Token that the Apple ID provider uses to authenticate the user. If the user has granted permissions to your app, the credential object may also include the user's name and email address.
For additional information on how to implement Sign in with Apple, check out:
The official Sign in with Apple documentation on Apple's Developer Portal
The Introducing Sign In with Apple session from WWDC 2019
The associated reference application.
An iOS app that uses Apple ID authentication must target iOS 13 or newer.
The following diagram shows the OAuth logic flow:
Before you can implement Apple ID authentication you will need the following:
When using Sign-in with Apple with Atlas App Services, you can configure the Apple authentication provider for either a mobile application or a web application.
If you would like to use Sign in with Apple for both, you could set up your own manual Sign in with Apple flow for either the web or mobile app. Then, use the JWT that returns with the Custom JWT authentication provider. In the Realm SDKs, you can then link the user identities for each authentication provider to a single user.
To use Sign in with Apple exclusively with either a web or a mobile application, choose your application type and follow this guide.
For code examples that demonstrate how to register and log in using Apple authentication, see the documentation for the Realm SDKs: