Search Results :

×

Drupal Apple SSO Login with OAuth Client Setup guide

Drupal OAuth Client module enables Single Sign-On i.e. SSO for a Drupal site with any Identity Provider using OAuth or OpenID connect protocol. This module is compatible with Drupal 7, Drupal 8, Drupal 9, Drupal 10, and Drupal 11. Here we will go through the steps to configure the module with the Apple. Once this configuration is done, users will be able to log in to the Drupal site using their Apple credentials.

  • Download the module:
    composer require 'drupal/miniorange_oauth_client'
  • Navigate to Extend menu on your Drupal admin console and search for miniOrange OAuth Client Configuration using the search box.
  • Enable the module by checking the checkbox and click on the Install button.
  • You can configure the module at:
    {BaseURL}/admin/config/people/miniorange_oauth_client/config_clc
  • Install the module:
    drush en drupal/miniorange_oauth_client
  • Clear the cache:
     drush cr
  • You can configure the module at:
    {BaseURL}/admin/config/people/miniorange_oauth_client/config_clc
  • Navigate to Extend menu on your Drupal admin console and click on Install new module.
  • Install the Drupal OAuth & OpenID Connect Login - OAuth2 Client SSO Login module either by downloading the zip or from the URL of the package (tar/zip).
  • Click on Enable newly added modules.
  • Enable this module by checking the checkbox and click on install button.
  • You can configure the module at:
    {BaseURL}/admin/config/people/miniorange_oauth_client/config_clc
  • After installing the module, navigate to the Configuration -> miniOrange OAuth Client Configuration -> Configure OAuth tab and select Custom OAuth 2.0 Provider from the Select Application dropdown list.
  • Copy the Callback/Redirect URL and keep it handy.
  • Note and Contact Us - SSO between two WordPress sites

    Note: If your provider only supports HTTPS Callback/Redirect URLs and you have an HTTP site, please make sure to enable the 'Enforce HTTPS Callback URL' checkbox at the bottom of the tab.


  • Enter the name in the Custom App Name text field. For example, Apple.
Drupal as OAuth Client - Under Configure OAuth -> Select Application - Copy Callback/Redirect URL and provide the Display name

drupal oauth client Login to apple

dupal oauth single sign-on SSO create apple account

  • Click on Certificates, Identifiers & Profiles tab.
drupal oauth single sign-on SSO login Certificates Identifiers and Profiles

  • 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.
drupal oauth single sign-on SSO login user Identifiers

  • Enter Description and Bundle ID for the App ID. (The Bundle ID should be in reverse-dns style string.)
drupal oauth single sign-on SSO login app Description

  • In the Capabilities section scroll down and select sign In with apple and Click on Edit link.
drupal oauth single sign-on SSO login Capabilities and Enable as a primary App Id

  • Select Enable as a primary App Id and click on Save. Click on Continue and then click on Register.
\ drupal oauth single sign-on SSO primary App

  • 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.
drupal oauth single sign-on SSO app Plusicon

  • Enter Description and Identifier( Identifier would be your client id). and click on the Continue and after that Register button.
apple single sign-on SSO login description and clientid

  • Click on Keys tab from the left menu.Click on the Plus icon to register a new key.
drupal oauth single sign-on SSO app register a new key

  • Give your Key a name, and select Sign In with Apple and click on Configure button.
drupal oauth single sign-on SSO login key

  • Select your Primary Id and click on the Save button and after that at the right corner click on Continue and Register button.
drupal oauth single sign-on SSO login app Register

  • Click on the Download button once the key is downloaded click on the Done button.
druapl oauth single sign-on SSO Download once the key is downloaded

  • In the left menu click on Identifiers and the right top click on App IDs.
drupal oauth single sign-on SSO select app id

  • Click on Service IDs from the drop down menu.
drupal oauth single sign-on SSO select service IDs is apple AppIDs

  • Select your Service Id from the List.
drupal oauth single sign-on SSO select service IDs is apple AppIDs

  • Select Sign In with Apple and click on Configure button.
drupal oauth single sign-on SSO login app configure

  • 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 Drupal module).
druapl oauth single sign-on SSO social login apple redirectURL

  • 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.
drupal oauth single sign-on SSO app id and secret

  • Download the Ruby installer from the following link https://rubyinstaller.org/downloads/ and then install it.
  • Search for the Start command prompt with ruby open the ruby command prompt andinstall 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 fileand downloaded .p8 file in the same folder.
  • Enter the name of downloaded file example= "key.P8", key_id , client_id, team_id in the code
  • Open Ruby command prompt and run the above code using the following command ruby filename.rb
  • 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
  • You will get your secret key. Copy the secret key.
apple secret key

  • Go to miniOrange OAuth Client module.
  • In Configure OAuth tab, paste the copied Client ID and Client Secret in the Client ID and Client Secret text-field.
Apple sso login with drupal OAuth OpenID Single Single On apple Client Credentials

  • You have successfully completed your Apple App OAuth Server side configurations.
  • Client ID : from the step 2 above
    Client Secret : from the step 3 above
    Scope: email
    Authorize Endpoint: https://appleid.apple.com/auth/authorize
    Access Token Endpoint: https://appleid.apple.com/auth/token
  • After successfully saving the configurations, please click on the Test Configuration button to test the connection between Drupal and Apple.
Apple sso login with drupal OAuth OpenID Single Single On apple test Configuration

  • This Test Configuration window will provide you with a list of the attributes that are coming from the Apple.
  • Select the Email Attribute from the dropdown menu in which the user's email ID is obtained and click on the Done button.
Drupal-OAuth-Client-Azure-AD-SSO-email-attribute

  • Now, in the Attribute & Role Mapping tab, you can also choose the Username Attribute from the dropdown and click on the Save Configuration button.
Apple sso login with drupal OAuth OpenID Single Single On Apple test Configuration successfully

Note and Contact Us - SSO between two WordPress sites

Note: Mapping the Email Attribute is mandatory for your login to work.


  • Now log out and go to your Drupal site’s login page. You will automatically find a Login with Apple link there. If you want to add the SSO link to other pages as well, please follow the steps given in the image below :
Provide-the-login-link-to-different-page-of-the-Drupal-site

If you face any issues during the configuration or if you want some additional features, please contact us at drupalsupport@xecurify.com.

More FAQs ➔

Follow the steps mentioned HERE

Follow the steps mentioned HERE

The logout functionality you've mentioned here is the default behavior of a module. It's logging you out of Drupal but not from your Application/Provider. To allow the module to logout from your provider/application account (what you are looking for), you need to make the below configurations: [know more]

As you have upgraded to one of our paid versions of the Drupal module and replaced the free module with the paid one, you must first activate the paid module. Please refer to the below steps. [Know more]


[MO_CONTACT_US]
ADFS_sso ×
Hello there!

Need Help? We are right here!

support