Application id and secret (also sometimes referred as Consumer key and secret or Client id and secret) are what we call an application credentials. This application will link your website to Apple API and these credentials are needed in order for Apple users to access your website. These credentials may also differ in format, name and content depending on the social network.
To enable authentication with this provider and to register a new Apple API Application, follow the steps :
Create Apple App #
- Make sure you have an active subscription for the Apple Developer Program, as that is necessary for both creating and maintaining an Apple App!
- Make sure your site have SSL, since Apple only allows HTTPS urls!
- Navigate to https://developer.apple.com/account/resources/identifiers/list
- Log in with your Apple Developer credentials if you are not logged in.
1.) Create the associated App: #
- Click the blue + icon next to Identifiers, then select the App IDs option and click the “Continue” button.
- Choose the “App” option as type and press the “Continue” button.
- Enter a “Description“
- At the “Bundle ID” field select the “Explicit” option and enter your domain name in reverse-domain name style, with the name of the app at its end: com.samplewebsite.slaiapp
- Under the “Capabilities” section, tick the “Sign In with Apple” option.
- Scroll up and press the “Continue” button and then the “Register” button.
2.) Create the Key: #
- On the left hand side, click on the “Keys” tab.
- Click the blue + icon next to Keys heading.
- Enter a name in the Key Name field.
- Tick the “Sign In with Apple” option, then click on “Configure“.
- If you have multiple Apps, then at the “Choose a Primary App ID” field select the App what you just created, then click “Save“.
- Finally press the “Continue” button and then the “Register” button.
- Don’t download the key yet!
3.) Create the Service: #
- Go to the “Services IDs” section, what you will find within the “Identifiers” tab.
- Click the blue + icon next to Identifiers, then select the “Services IDs” option and click the “Continue” button.
- Enter a “Description“.
- At the “Identifier” field enter your domain name in reverse-domain name style, with the name of the client at its end: com.samplewebsite.slaiclient
- Note: This will also be used as Service Identifier later!
- Press the “Continue” button and then the “Register” button.
- In the “Services IDs” section, click the service you just created.
- Tick the “Sign In with Apple” option and click the “Configure” button next to it.
- If you have multiple Apps, then at the “Primary App ID” field select the App what you just created.
- Fill the “Domains and Subdomains” field with your domain name probably: samplewebsite.com
- Add the following URL to the “Return URLs” field:
- Click the “Next” button then press the “Done” button.
- Finally press the “Continue” button and then the “Save” button.
4.) Configure your credentials: #
- Navigate to: https://developer.apple.com/account/resources/identifiers/list/serviceId
- You will find it under the “IDENTIFIER” column. If you configured the service according to the suggestions, it will probably end to .slaiclient e.g.: com.samplewebsite.slaiclient
- Team ID:
- A 10 character long identifier, what you can find on the top-right corner, just under your name.
- Key ID:
- Navigate to: https://developer.apple.com/account/resources/authkeys/list
- Click on the name of your Key.
- You will find your “Private Key ID” under “Key ID“.
- Key Content:
- Click the “Download” button to download the key file. Once this file is downloaded, it will no longer be available, so make sure you keep this file safe!
- Open the downloaded file with a text editor, like Notepad, copy all of its contents and paste it into the “Key Content” field.