iCloud authentication
Apple requires an app-specific password when you authenticate iCloud accounts. Learn more about setting up app passwords in Nylas.
Before you begin
Before you start authenticating iCloud accounts, read the Nylas Hosted auth and Native auth documentation.
iCloud Hosted authentication
To authenticate your end users' iCloud accounts using Hosted auth, follow these steps:
- Have your end user generate an app-specific password. They need it to continue.
- Redirect the end user to the Nylas Hosted auth login page by making a
GET /oauth/authorize
request. - Have the end user log in using their iCloud account and the app-specific password from step 1.
- Complete the auth flow by getting the end user's access tokens based on the
response_type
.
iCloud Native authentication
To authenticate your end users' iCloud accounts using Native auth, follow these steps:
-
Have your end user generate an app-specific password. They need it to continue.
-
Create a branded page as you normally would.
-
Make an authorization request and provide the end user's app-specific password in the settings.
curl -X POST https://api.nylas.com/connect/authorize -d '{
"client_id": "<NYLAS_CLIENT_ID>",
"name": "Nyla the Cheetah",
"email_address": "[email protected]",
"provider": "icloud",
"settings": {
"password": "app-specific-password"
},
"scopes": "email.read_only,calendar.read_only,contacts.read_only"
}' -
Exchange the
code
as you normally would.