Apple SSO login can be achieved by integrating your app as Service Provider and Apple ID OAuth IDP (Identity Provider) in miniOrange.
Here, we will go through a step-by-step guide to test SSO connection by setting up miniOrange as SP & Apple as IDP. You can follow the same steps to set up your own application as SP instead of miniOrange.
Connect with External Source of Users
miniOrange provides user authentication from various external sources, which can be Directories (like ADFS, Microsoft Active Directory, Azure AD, OpenLDAP, Google, AWS Cognito etc), Identity Providers (like Shibboleth, Ping, Okta, OneLogin, KeyCloak), Databases (like MySQL, Maria DB, PostgreSQL) and many more.
Follow the Step-by-Step Guide given below for Apple Single Sign-On (SSO)
1. Configure miniOrange as Service Provider (SP) in Apple ID
In the left menu Click on Identifiers and after that click on the Plus Icon(blue color). Click on Continue for the next 2 pages of Apple Account.
Enter Description and Bundle ID for the App ID. (The Bundle ID is best when it’s a reverse-dns style string.)
In the Capabilities section scroll down and select sign up with apple. Click on Edit and select Enable as a primary App Id and click on Save. Click on Continue and then click on Register.
In the right corner click on Continue and after that Register button.
Again click the Plus icon( blue color). Select Service IDs and click on Continue.
Enter Description and Identifier ( Identifier would be your client id - Copy this id, it will be used in further steps ).Click on the Continue and after that Register button.
Click Keys from the left menu.Click on the Plus icon to register a new key.
Give your Key a name, and select Sign In with Apple and click on Configure button
Select your Primary Id and click on the Save button and after that at the right corner click on Continue and Register button.
Click on the Download button once the key is downloaded click on the Done button.
In the left menu click on Identifiers.
At the right top click on App IDs.
Select Service IDs from the drop-down menu.
Select your Service Id from the List.
Select Sign In with Apple and click on Configure button
Select the Primary App Id from the drop-down, and Enter the Domain and Redirect URL in Domains and Subdomains and Return URLs respectively and click on the Next button (You will get the Domain name and Redirect URL from miniOrange dashboard)
Verify the details and click on the Done button. After that at the right corner click on the Continue button.
Copy the Identifier value and click on the Save button.
Now follow below steps to generate the client secret key
Search for the Ruby in windows search bar. Click on Start command prompt with ruby. Ruby command prompt will be opened.Now, install the JWT gem by running the following command on the command line:gem install JWT.
Copy the below code in a file and save the file with the .rb extension. Keep this .rb file and downloaded .p8 file in the same folder