Adding an identity provider - Apple
Adding Apple as an external identity provider (IdP) gives your users the option to sign on with Apple when accessing your application.
Before you begin
Ensure that you have:
-
A PingOne organization with an environment added. Learn more in Starting a PingOne trial.
-
Added your application to PingOne. Learn more in Adding an application.
-
An Apple account.
Creating an App ID
When you register your application, Apple generates an App ID to identify the application. You’ll need this value to connect the application to PingOne.
Steps
-
Go to the Apple Developer site and sign on to your Apple Developer account.
If you don’t have an Apple Developer account, you’ll need to create one.
-
Click Certificates, Identifiers & Profiles.
-
On the left, click Identifiers and then click the icon.
-
In the Register a New Identifier section, select App IDs.
-
In the Register an App ID section, enter a value for the Bundle ID.
-
Copy the following values to a secure location:
-
App ID prefix (Team ID): Identifies your team or organization.
-
Bundle ID: Identifies a group of applications.
-
-
In the list of available capabilities, select Sign in with Apple.
-
Click Continue and Register.
Creating a Services ID
The Services ID identifies the particular instance of your application. The Services ID is equivalent to a client ID in PingOne.
Steps
-
On the Apple Developer site, sign on to your Apple Developer account and then click Certificates, Identifiers & Profiles.
-
In the Register a New Identifier section, select Services ID.
-
Enter the following information:
-
Description: A brief description of the application.
-
Identifier: The path to the application. This value will be used as the client ID in PingOne.
-
-
Click Continue and Register.
-
In the list, select the service you just created.
-
Select Sign in with Apple and click Configure.
-
Select the primary App ID and click the icon.
-
Enter a value for Domains and subdomains.
This is the top-level domain for your application.
-
Leave the Return URLs blank for now.
This is the path in your application that users are redirected to after they have authenticated with Apple. This value is equivalent to a callback URI. You’ll enter this value after you set up your application in PingOne.
-
Click Next, and then click Done.
-
Click Continue, and then click Save.
Creating a private key
When you register your application, Apple generates a private key for client authentication. You’ll need this value when you add the application to PingOne.
Steps
-
On the Apple Developer site, click Certificates, Identifiers & Profiles.
-
On the left, click Keys.
-
To register a new key, click the icon.
-
Enter a value for Key Name.
-
Select Sign in with Apple and click Configure.
-
Select the primary App ID you created earlier.
-
Click Save and then click Continue.
-
Click Register.
-
Copy the Key ID to a secure location.
You’ll use this value when you add the IdP in PingOne.
-
To save the key to the local file system, click Download.
The key is saved as a text file with a
.p8
file extension. The key will be used as the client secret signing key and its identifier will be used as the private key in PingOne.You can download the key only once. Save the file to a secure location because the key is not saved in your developer account, and you won’t be able to download it again. If the Download button is disabled, you already downloaded the key.
Configuring email communication
Configuring Apple for email communication allows users to set up an account and sign on to applications with their existing Apple ID, which is required for PingOne to communicate with users and for users to receive updates from Apple. Learn more in Configure private email relay service in the Apple Developer documentation.
Steps
-
On the Apple Developer site, click Certificates, Identifiers & Profiles.
-
On the left, click More and then click Configure.
-
Next to Email Sources, click the icon.
-
For Domains and subdomains, enter
pingidentity.com
. -
Click Next.
-
Click Register and then click Done.
Adding Apple as an identity provider in PingOne
Configure the IdP connection in PingOne.
Before you begin
Ensure that registration is enabled in the authentication policy. Learn more in Editing an authentication policy.
You should have the following information ready:
-
App ID (Client ID)
-
Client secret signing key
-
Team ID
-
Private key ID
Learn more in Creating an App ID and Creating a private key.
Steps
-
In the PingOne admin console, go to Integrations > External IdPs and click .
-
Click Apple.
-
Click Next.
-
On the Add External Identity Provider page, enter the following information:
-
Name: A unique identifier for the IdP.
-
Description (optional): A brief description of the IdP.
-
Population: A population that overrides the authentication policy’s registration population and enables just-in-time registration from the IdP.
You can’t change the Icon and Sign-on Button in accordance with the provider’s brand standards.
-
-
Click Next.
-
Configure the connection and enter the following information:
-
Service ID (App ID): The application ID that you copied earlier from the IdP. You can find this information on the Apple Developer site.
-
Private key: The application secret that you copied earlier from the IdP. You can find this information on the Apple Developer site.
-
Team ID: A unique 10-character string generated by Apple that identifies your organization. The team ID is the prefix of the app ID.
-
Private key ID: Identifies the private key in the JSON Web Token (JWT). This JSON object is the client secret in PingOne.
-
Callback URL: Copy the Callback URL to a secure location. You’ll provide this value to the IdP later.
-
-
Click Next.
-
Map the following PingOne attributes to Apple attributes:
PingOne attribute
Apple attribute
Given Name
providerAttributes.name.firstName
Family Name
providerAttributes.name.lastName
Apple only sends an ID token with the first authentication using Sign in with Apple.
Learn more about Sign in with Apple in Authenticating users with Sign in with Apple in the Apple documentation.
-
Map additional attributes as needed.
Learn more in Mapping attributes.
You can map additional attributes if they are in the ID token from Apple, such as
iss
,iat
,exp
,aud
,sub
,nonce
,nonce_supported
,email
, andemail_verified
. Learn more about the JSON structure generated by Apple in Configuring your webpage for Sign in with Apple in the Apple documentation.-
Enter the PingOne user profile attribute and the external IdP attribute. Learn more about attribute syntax in Identity provider attributes.
-
To add an attribute, click Add.
-
To use the advanced expression builder, click the Gear icon. Learn more in Using the expression builder.
-
Select the update condition, which determines how PingOne updates its user directory with the values from the IdP. The options are:
-
Empty only: Update the PingOne attribute only if the existing attribute is empty.
-
Always: Always update the PingOne directory attribute.
-
-
-
Click Save.
Adding the return URL to the Apple Developers site
Copy the callback URL from the PingOne admin console and paste it in the Apple Developers site.
Steps
-
In the PingOne admin console, go to Integrations > External IdPs and browse or search for the appropriate IdP.
-
Click the IdP to open the details panel.
-
Click the Connection tab.
-
Copy the callback URL to a secure location.
-
On the Apple Developer site, click Certificates, Identifiers & Profiles.
-
Select Sign in with Apple and click Configure.
-
Select the primary app ID and click the icon.
-
For Return URLs, paste the Callback URL value that you copied earlier.
-
Click Next, and then click Done.