Configure WHMCS Single Sign-On (SSO) with WordPress OAuth
Overview
Set up Single Sign-On (SSO) on your WordPress website via the WHMCS Identity Provider (IDP) with the WordPress OAuth & OpenID Connect Single Sign-On plugin. Implementing WHMCS SSO allows users to log into your websites and applications with a single set of credentials using the enterprise-level WHMCS OAuth provider. WHMCS acts as the OAuth Provider and WordPress acts as the OAuth Client. WordPress WHMCS Authentication provides smooth login between these two, removing the need to remember usernames and passwords. The WHMCS OAuth WordPress plugin also provides advanced SSO features like user profile attribute mapping, role mapping, and granting website pages and posts access based on user groups present in WHMCS. You can also protect your complete WordPress site behind SSO. WHMCS WordPress OAuth SSO plugin secures the user’s login process and improves user authentication authority. Follow the steps in the guide below to install this plugin
Pre-requisites : Download And Installation
- Log into your WordPress instance as an admin.
- Go to the WordPress Dashboard -> Plugins and click on Add New.
- Search for a WordPress OAuth Single Sign-On (SSO) plugin and click on Install Now.
- Once installed click on Activate.
Steps to configure WHMCS Single Sign-On (SSO) Login into WordPress
Step 1: Setup WHMCS as OAuth Provider
- First of all, go to your WHMCS domain and log into your WHMCS Administrator account.
- You will be presented with following screen. Go to Setup OpenID Connect on the navigation bar on top.
- Click on Generate New Client API Credentials button.
- You will be redirected to the app details page. Fill in the required details and enter Authorized Redirect URIs from miniOrange OAuth/OpenID Connect Plugin and click on Generate Credentials.
- You will be brought to App details page. Here, you can find Client ID and Client Secret.
- Copy these credentials in MO OAuth Plugin configuration on corresponding fields.
Your WordPress site has been successfully set up WHMCS Single Sign-On (SSO) with WHMCS as an OAuth Provider, enabling users to securely access their digital resources with a single set of login credentials and establishing user authentication using WHMCS WordPress login.
Step 2: Setup WordPress as OAuth Client
- Free
- Premium
Step 3: User Attribute Mapping
- User Attribute Mapping is mandatory for enabling users to successfully login into WordPress. We will be setting up user profile attributes for WordPress using below settings.
- Go to Configure OAuth tab. Scroll down and click on Test Configuration.
- You will see all the values returned by your OAuth Provider to WordPress 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.
- Once you see all the values in Test Configuration, go to Attribute / Role Mapping tab, you will get the list of attributes in a Username dropdown.
Finding user attributes:
Step 4: Role Mapping [Premium]
- Click on “Test Configuration” and you will get the list of Attribute Names and Attribute Values that are sent by your OAuth provider.
- From the Test Configuration window, map the Attribute Names in the Attribute Mapping section of the plugin. Refer to the screenshot for more details.
- Enable Role Mapping: To enable Role Mapping, you need to map Group Name Attribute. Select the attribute
name from the list of attributes which returns the roles from your provider application.
Eg: Role - Assign WordPress role to the Provider role: Based on your provider application, you can allocate the
WordPress role to your provider roles. It can be a student, teacher, administrator or any other depending on
your application. Add the provider roles under Group Attribute Value and assign the required WordPress role in
front of it under WordPress Role.
For example, in the below image. Teacher has been assigned the role of Administrator & Student is assigned the role of Subscriber. - Once you save the mapping, the provider role will be assigned the WordPress administrator role after
SSO.
Example: As per the given example, Users with role ‘teacher’ will be added as Administrator in WordPress and ‘student’ will be added as Subscriber.
Step 5: Sign In Settings
- WordPress 5.7 and below
- WordPress 5.8
- WordPress 5.9 and above
WHMCS Single Sign-On (SSO) should now be successfully configured with WHMCS as the OAuth Provider and WordPress as the OAuth Client. WHMCS SSO should fulfill all your needs with features like multi-factor authentication, multiple grant type support, attribute mapping, role mapping, etc.