Hello there!

Need Help? We are right here!

Support Icon
miniOrange Email Support
success

Thanks for your Enquiry. Our team will soon reach out to you.

If you don't hear from us within 24 hours, please feel free to send a follow-up email to info@xecurify.com

Search Results:

×

Apple Single Sign-On SSO


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

  • Go to https://developer.apple.com click on Account and Login with your Apple developer account.
  • Single Sign On Apple apps

  • Click on Certificates.
  • Single Sign On Apple apps

  • 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.
  • Single Sign On Apple apps

  • Enter Description and Bundle ID for the App ID. (The Bundle ID is best when it’s a reverse-dns style string.)
  • Single Sign On Apple apps

  • 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.
  • Single Sign On Apple apps

    Single Sign On Apple apps

  • 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.
  • Single Sign On Apple apps

  • 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.
  • Single Sign On Apple apps

  • Click Keys from the left menu.Click on the Plus icon to register a new key.
  • Single Sign On Apple apps

  • Give your Key a name, and select Sign In with Apple and click on Configure button
  • Single Sign On Apple apps

  • Select your Primary Id and click on the Save button and after that at the right corner click on Continue and Register button.
  • Single Sign On Apple apps

  • Click on the Download button once the key is downloaded click on the Done button.
  • Single Sign On Apple apps

  • In the left menu click on Identifiers.
  • At the right top click on App IDs.
  • Select Service IDs from the drop-down menu.
  • Single Sign On Apple apps

  • Select your Service Id from the List.
  • Select Sign In with Apple and click on Configure button
  • Single Sign On Apple apps

  • 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)
  • Single Sign On Apple apps

  • 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.
  • Single Sign On Apple apps

  • Now follow below steps to generate the client secret key
  • Generating Secret Key

  • Download the Ruby installer from the following link https://rubyinstaller.org/downloads/ and then install it.
  • 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
  • require 'jwt' key_file = 'key.P8' team_id = '' client_id = '' key_id = '' ecdsa_key = OpenSSL::PKey::EC.new IO.read key_file headers = { 'kid' => key_id } claims = { 'iss' => team_id, 'iat' => Time.now.to_i, 'exp' => Time.now.to_i + 86400*180, 'aud' => 'https://appleid.apple.com', 'sub' => client_id, } token = JWT.encode claims, ecdsa_key, 'ES256', headers puts token
  • Now replace below values in the code as given below:
  • key_file = 'AuthKey_S86CR2U9KZ.P8' , give it the name of the downloaded P8 file
  • Key_id = It will be the Key ID you will get from your configured Key
  • Single Sign On Apple apps Details

  • Client_id: It is the identifier
  • Team_id: You will get this from top right corner as shown below:

  • Apple apps Identifier

  • Go to the folder location in command prompt which consists of rb and p8 file. Now run the above code using the following command: ruby filename.rb
  • You will be provided with your Client secret key. Copy and save the secret key; you will need it to configure Apple ID in miniOrange Dashboard.
  • Single Sign On Apple apps

2. Configure Apple ID as OAuth 2.0 Provider(IDP) in miniOrange.

  • Login into miniOrange Admin Console.
  • Go to Identity Providers and click on Add Identity Provider button.
  • Apple Single Sign-On (SSO) add app

  • Select OAUTH 2.0.
  • Apple Single Sign-On (SSO) add app

  • Fill in the details shown in the below image.
  • Apple Single Sign-On (SSO) add app

    IDP Name: Apple ID
    OAuth Authorize Endpoint https://appleid.apple.com/auth/authorize?response_mode=form_post
    OAuth Access Token Endpoint* https://appleid.apple.com/auth/token
    Client ID* {Your service id} e.g. com.john.serviceid
    Client Secret* eyJraWQiOiJCOTJQUDg1VUw4IiwiYWxnIjoiRVMyNTYifQ.eyJpc3MiOiJFW....
    Scope email name
  • Click Save.

3. Test Connection

  • Now go to the /account page. Click on Users and Access in your Apple account and create a user.
  • Apple apps User Access

  • Navigate back to Identity Providers.
  • Click on Select >> Test Connection against the configured IDP.
  • Apple Single Sign-On (SSO) add app

  • You will be directed to enter your Apple Id.
  • Apple Single Sign-On (SSO) add app

  • On entering valid Apple credentials you will see a pop-up window which is shown in the below screen.
  • Apple Single Sign-On (SSO) add app

  • Hence your configuration of Apple as IDP in miniOrange is successfully completed.

External References

Want To Schedule A Demo?

Request a Demo
  



Our Other Identity & Access Management Products