Search Results :

×

Single Sign-On into Salesforce with Joomla as OAuth Server

If you want to login to your Salesforce site using your Joomla username and password, you can simply do it using our Joomla OAuth Server plugin. Once you configure the Salesforce with Joomla OAuth Server plugin, you can login to your Salesforce application using Joomla credentials. It also allows you to send custom user attributes to your Salesforce site as per your requirements.

To know more about other features we provide in Joomla OAuth Server plugin, you can click here.

  • Login into your Joomla site’s Administrator console.
  • From left toggle menu, click on System, then under Install section click on Extensions.
  • Now click on Or Browse for file button to locate and install the plugin file downloaded earlier.
  • Installation of plugin is successful. Now click on Start Using miniOrange OAuth Server plugin.
  • Under the Configure OAuth tab, click on the ADD button.
Get Started with OAuth Server Setup

  • Login to your SalesForce account.
  • Switch to the SalesForce Classic mode from profile menu.
Configure Salesforce

  • Navigate to the Setup page.
Configure Salesforce

  • Search for Auth under the search bar in the left navigation panel.
  • Click on Auth Provider.
Configure Salesforce

  • Click on the New button.
Configure Salesforce

  • From the Provider Type dropdown, select Open ID Connect.
Configure Salesforce

  • Enter the Application name under the Name text field and copy the generated URL Suffix.
Configure Salesforce

  • Navigate to the Salesforce dashboard and paste the copied Client ID under the Consumer Key text field.
Configure Salesforce

  • Paste the copied Client Secret into the Consumer Secret text field.
Configure Salesforce

  • Go to the developer account of Salesforce and Configure the Salesforce as an OAuth client using the below details.
Client ID:
You can get the Client ID from Configure OAuth Tab in Joomla OAuth Server
Client Secret:
You can get the Client Secret from Configure OAuth Tab in Joomla OAuth Server
Scope:
email profile
Authorize Endpoint:
https://< your-Joomla-domain >/index.php
Access Token Endpoint:
https://< your-Joomla-domain >/index.php
Get User Info Endpoint:
https://< your-Joomla-domain> /plugins/system/miniorangeoauth/miniorangeoauthserver.php
Configure Salesforce

  • Click on the Automatically create a registration handler template link.
Configure Salesforce

  • Click on the Search icon next to the Execute Registration Handler As text box.
Configure Salesforce

  • Select the Admin account from the list of users.
Configure Salesforce

  • Click on the Save button.
Configure Salesforce

  • Now, click on the AutocreatedRegHandler link next to the Registration Handler.
Configure Salesforce

  • Click on the Edit button.
Configure Salesforce

  • Remove the existing code, paste the following code, and click on the Save button.
    global class AutocreatedRegHandlerMoDrupal implements Auth.RegistrationHandler{   
        global User createUser(Id portalId, Auth.UserData data){
            User u = new User();
            Profile p = [SELECT Id FROM profile WHERE name='Chatter Moderator User'];
            u.username = data.email.split('@')[0] + '@miniorange_drupal.com';
            u.email = data.email;
            u.lastName = 'Unknown';
            u.firstName = 'Unknown';
            u.languagelocalekey ='en_US';
            u.localesidkey = 'en_US';
            u.emailEncodingKey = 'UTF-8';
            u.alias = (data.email.split('@')[0].length() > 8) ? data.email.split('@')[0].substring(0, 8) : data.email.split('@')[0];
            u.timeZoneSidKey = 'America/Los_Angeles';
            u.profileId = p.Id;
            insert u;
            return u;
        }
    
        global void updateUser(Id userId, Id portalId, Auth.UserData data){
              User u = new User(id=userId);
              u.email = data.email;
              update(u);
        }
    }
Configure Salesforce

  • Please confirm that the Callback URL you previously entered in Drupal matches the one provided here. If there was a different configuration earlier, please update it to match the URL provided here.
Configure Salesforce

  • In the left navigation panel search for My Domain and click on it.
Configure Salesforce

  • Scroll down to the Authentication Configuration section and click on the Edit button.
Configure Salesforce

  • Enable the checkbox next to the Application configured under the Authentication Service section and click on the Save button.
Configure Salesforce

  • Now go to the Configure OAuth tab, and enter the Client Name and Redirect URL in the respective fields.
  • Then click on the Save Client button.
Enter Client Name and Redirect URL

  • Under the List of OAuth Client's table, copy the Client ID and Secret of your Client. Go to your OAuth client and paste the Client ID and Secret in the respective fileds.
Get Started with OAuth Server Setup

  • Congratulations, you have successfully configured Joomla as your OAuth Server.

ADFS_sso ×
Hello there!

Need Help? We are right here!

support