Integrating with Apple Identity
Pathfix allows you to easily add Apple identity (Login with Apple) for your end-user, handling authorization and enable communication between your app and Apple in just a few minutes.
Before proceeding, you must have enrolled in the Apple developer program. To enroll in the Apple developer program, go to developer.apple.com/programs/enroll
- On the Apple Developer portal, go to Certificates, Identifiers, & Profiles.
- On the Identifiers tab, select the (+) button.
- On the Register a New Identifier page, choose App IDs and select Continue. (App IDs include one or more Service IDs.)
- On the Register an App ID page, add a description you want under Description and add the Bundle ID as per your domain (e.g. auth.acmesaas.com)
- Select Sign in with Apple from the capabilities list. Then select Continue
IMPORTANT: Make a note of your App ID Prefix (Team ID) from this step, you'll need to enter this in Pathfix under Team ID.
![Image: Register App ID Image: Register App ID](https://archbee-doc-uploads.s3.amazonaws.com/E6H_--BmYJWG_yGaOUOxt/_Bjho9j_nv1d1uxw60BPn_image.png)
- Review the app registration information and select Register.
- Again, on the Identifiers tab, select the (+) button.
- On the Register a New Identifier page, choose Services IDs and select Continue
- On the Register a Services ID page, provide a description and an identifier. The description is what will be shown to the user on the consent screen. The identifier will be your domain e.g. com.acmesaas.auth
- Select Configure.
- On the pop-up window, set the Primary App Id to the App Id you created earlier. Specify your application's domain in the domain section. For the Return URL, use the URL https://labs.pathfix.com/integrate/command
- Review the service registration information and select Save.
- On the Keys tab in the Apple Developer portal, choose Create a key or select the (+) button.
- On the Register a New Key page give the key a name, check the box next to Sign in with Apple and select Configure.
- On the Configure Key page, link the key to the primary app ID you created previously and select Save.
- Finish creating the key by confirming the information and selecting Continue and then reviewing the information and selecting Register.
- On the Download Your Key page, download the key. It will download as a .p8 (PKCS#8) file - you'll use this Key in Pathfix
![Image: Key ID and p8 Key Image: Key ID and p8 Key](https://archbee-doc-uploads.s3.amazonaws.com/E6H_--BmYJWG_yGaOUOxt/-ISCPbwDpXHBM44_SQhHq_image.png)
Please note: Once you have downloaded the Key, it will download in a .p8 format. You will need to open this file and reformat the key into a single line for use in Pathfix. .e.g:
- Sample p8 file data:
![Document image Document image](https://images.archbee.com/E6H_--BmYJWG_yGaOUOxt/Moat4y35iIV4908kgRncc_image.png?format=webp)
- Reformat to single line:
![Document image Document image](https://images.archbee.com/E6H_--BmYJWG_yGaOUOxt/SoWOJ9VX9n3MIvrIxXn-9_image.png?format=webp)
There are 4 keys that are required in Pathfix for Apple Identity. Here's where you get each of the keys:
- Team ID: App ID Prefix
- Service Identifier: com.acmesaas.auth (Service ID's Bundle ID)
- p8 Key: Key downloaded and formatted into single line
- Key ID: Key ID (from the Download Your Key page)
- Login to your Pathfix account and click on Add Application
- Add the name of your SaaS and hit Save
- Select Apple Identity from the list of providers to integrate with. You can change the Display Name and Description.
- Enter the Team ID, Service Identifier, p8 Key and Key ID generated from Apple
![Image: Configure Apple Identity in Pathfix Image: Configure Apple Identity in Pathfix](https://archbee-doc-uploads.s3.amazonaws.com/E6H_--BmYJWG_yGaOUOxt/Z4rKrcZeeTxvOCN-eqce6_image.png)
Adding the SSO/Login functionality to the app is done based on your SaaS stack:
Need help? Reach out to us at [email protected] and we would be happy to assist!
![Doc contributor](https://s3.amazonaws.com/archbee-animals/cat.png)