Search Results :

×

Apple Single Sign-On (SSO) OAuth / OpenID Connect into Magento | Magento Apple SSO Login

Apple Single Sign-On (SSO) OAuth / OpenID Connect into Magento | Magento Apple SSO Login


Integration of Apple Login (Apple OAuth Single Sign-On) with Magento using OAuth 2.0 Protocol. The Magento OAuth / OpenID Connect Single Sign-On (SSO) plugin makes it easy to use OAuth2 to set up Apple Login on Magento (Apple Single Sign on).

The plugin can be set up using other Social Media sources, as well as custom OAuth and OIDC providers. It contains a lot of Single Sign-On (SSO) features, like Attribute Mapping for user profiles, Role Mapping, and so on. In this guide, we'll go over how to set up SSO between Magento and Apple. At the end of this article, users should be able to log into Magento using Apple. Click here to read more about the Magento OAuth Single Sign-On (OAuth & OpenID Connect Client) plugin's extra features.

The Magento OAuth & OpenID Connect Single Sign-On (SSO) plugin makes it possible to log into Magento securely using Apple as an OAuth and OpenID Connect provider. You can also use alternative OAuth providers, such as Azure B2C, Office 365, and other custom providers, to configure the plugin. Advanced Single Sign-On features such as user profile Attribute Mapping, Role Mapping, and so on are supported. We'll go over how to set up SSO between Magento and Apple in this article. Users should be able to log in to Magento through Apple by the end of this guide.

Click here to know more about other features we provide in Magento OAuth Single Sign-On ( OAuth & OpenID Connect Client ) plugin

Pre-requisites : Download And Installation

Installation using Composer:
  • Purchase the miniOrange OAuth / OpenID Connect Single Sign On extension from magento marketplace.
  • Go to My profile -> My Purchases
  • Please ensure you are using correct access keys (My Profile - Access Keys)
  • Paste the access keys in your auth.json file inside your project
  • Use the below command to add the extension to your project.
    "composer require miniorange-oauth-sso:{version}"
  • You can see the module name and list of versions in the selector below the extension module name.
  • Run the following commands on command prompt to enable the extension.
  • php bin/magento setup:di:compile
    php bin/magento setup:upgrade

Manual Installation:
  • Download the miniOrange OAuth OpenID Connect Single Sign-On extension zip from here.
  • Unzip all contents of the zip inside the MiniOrange/OAuth directory.
  • {Root Directory of Magento} app code MiniOrange OAuth
  • Run the following commands on command prompt to enable the extension.
  • php bin/magento setup:di:compile
    php bin/magento setup:upgrade

Magento OAuth OpenID Connect SSO extension allows login (Single Sign-On) into Magento with your Azure AD, Azure B2C, AWS Cognito, WSO2, Okta, LinkedIn, Google, Facebook, Slack, Discord or other custom OAuth 2.0 providers [24/7 SUPPORT]

 Tested with 2.4.5

Steps to Configure Apple OAuth & OpenID Single Sign-On (SSO) Login into Magento

1. Setup Apple as OAuth Provider

Follow the steps below to configure Apple as OAuth Provider

miniorange img Configure Apple as OAuth Provider
  • First of all, go to https://developer.apple.com click on Account and Login with your Apple developer account.
  • apple single sign-on SSO Login to apple Magento apple single sign-on SSO create apple account | Magento Apple SSO
  • Click on Certificates, Identifiers & Profiles tab.
  • Magento apple 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.
  • Magento apple SSO login user Identifiers | Magento Apple Login
  • Enter Description and Bundle ID for the App ID. (The Bundle ID should be in reverse-dns style string.)
  • apple single sign-on SSO login app Description
  • In the Capabilities section scroll down and select sign with apple and Click on Edit link.
  • apple single sign-on SSO login | Apple login in Magento
  • Select Enable as a primary App Id and click on Save. Click on Continue and then click on Register.
  • apple single sign-on SSO primary App | Magento Apple Login
  • 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.
  • Magento Apple SSO | Apple login in Magento
  • 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.
  • Magento SSO Apple Login register a new key
  • Give your Key a name, and select Sign In with Apple and click on Configure button.
  • OAuth 2.0 Magento SSO login key Magento Apple Login
  • Select your Primary Id and click on the Save button and after that at the right corner click on Continue and Register button.
  • apple single sign-on SSO login app Register
  • Click on the Download button once the key is downloaded click on the Done button.
  • apple 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.
  • apple single sign-on SSO select app id | Magento apple SSO
  • Click on Service IDs from the drop down menu.
  • Magento Apple single sign-on SSO select service IDs is apple AppIDs
  • Select your Service Id from the List.
  • Magento single sign-on SSO select service IDs | Magento SSO
  • Select Sign In with Apple and click on Configure button.
  • Magento apple single sign-on SSO login app configure | Magento 2 SSO
  • 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 plugin).
  • apple 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.
  • apple single sign-on SSO app id and secret | Magento SSO
  • Enter the Identifier value in the Client ID and copy the downloaded key value in Client secret of the miniOrange OAuth Client plugin.

2. Generating Secret Key

  • 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.
  • Magento apple secret key | Apple SSO magento 2

You have successfully configured Apple as OAuth Provider for achieving Apple Single Sign-On (SSO) with Magento for user authentication.

3. Configuring Magento 2 as OAuth Client

  • After successfully configuring OAuth Provider, go to OAuth Provider tab and configure OAuth Provider Name, Client ID, Client Secret, Scope and provided endpoints.

    Please refer below Endpoints to configure the OAuth client


    Scope: email
    Authorize Endpoint: https://appleid.apple.com/auth/authorize?response_mode=form_pos
    Access Token Endpoint: https://appleid.apple.com/auth/token
  • Click on the Save button to save the settings.
  • Click on the Test Configuration button.
  • Magento 2 OAuth credentials Apple SSO OAuth
  • You will see all the values returned by your OAuth Provider to Magento in a table. If you don't see value for First Name, Last Name, Email or Username, make the required settings in your OAuth Provider to return this information.
  • The miniOrange Premium Plugin also provides you the the feature to auto redirect your user to the IdP Login Page.
  • Magento 2 OAuth auto redirect to idp Magento SSO
  • Go to the Sign In Settings tab and check options to enable SSO on your Magento site.
  • Magento 2 OAuth enable SSO Magento SSO
  • You have successfully configured your Magento 2 as an OAuth Client. You will see the SSO button on your frontend. Click on the button and test the SSO.
  • Magento 2 OAuth SSO Apple SSO Apple magento SSO magento 2 OAuth client SSO Apple SSO

4: Attribute Mapping (Optional). *This is Premium feature.

  • You can map attributes in the Attribute Mapping tab. Only username and email are allowed to be mapped in free version of the plugin. However, in the premium version of the plugin, you can map various attributes coming from your OAuth Provider to the attributes present in your Magento site.
  • Magento 2 OAuth attribute mapping Magento SSO

5: Role Mapping (Optional). *This is Premium feature.

  • You can specify a default role in the free plugin that will be allocated to all non-admin users when they conduct SSO.
  • Go to Attribute/Role mapping tab and navigate to Role Mapping section.
  • Select the Default Role and click on the Save button.
  • Apple Magento SSO - Apple Single Sign-On(SSO) Login in Magento - role mapping

By configuring Apple as an OAuth Provider and Magento as an OAuth Client using our Magento OAuth Client plugin, you have successfully installed Magento Apple Single Sign-On (SSO). Within minutes, you'll be able to provide safe access to your Magento site utilising Apple login credentials thanks to this solution.

Additional Resources


Why Our Customers choose miniOrange Magento Single Sign-On (SSO) Solutions?


24/7 Support

We offer 24/7 support for all Magento solutions. We ensure high quality support to meet your needs.

Sign Up

Customer Reviews

See for yourself what satisfied customers have to say about our reliable Magento solutions.

Reviews

Extensive Setup Guides

Easy and precise step-by-step instructions and videos to help you configure within minutes.

Watch Demo


We offer Secure Identity Solutions for Single Sign-On, Two Factor Authentication, Provisioning, and much more. Please contact us at

 +1 978 658 9387 (US) | +91 97178 45846 (India)   magentosupport@xecurify.com

Hello there!

Need Help? We are right here!

support
Contact miniOrange Support
success

Thanks for your inquiry.

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