Log in into Wordpress with Web Host Manager complete system (WHMCS) using OAuth Protocol
WHMCS is a application which is used for online businesses for billing and support services, it is a powerful tool for automation and support. WHMCS is a application which can handle everything from signup to termination. It supports OAuth 2.0 and thus can be integrated with any third party application. It is compatible with the major payment gateways such as Authorize.Net, Google Checkout, and PayPal, and includes many features such as the ability to use various currencies, create invoices, and create promotions.
If your users are using both WHMCS and Wordpress website, it is preferred to login with single login credentials. miniOrange provides Single Sign On solution which allows login into Wordpress website using WHMCS login credentials.
miniOrange provides a solution by introducing a WordPress plugin called OAuth Client to support WHMCS Single sign on and allows user to access your website by using their WHMCS account credentials to login into WordPress. OAuth Client plugin also allows login with google, facebook, twitter or other custom OAuth server. OAuth Client plugin works with any OAuth provider that conforms to the OAuth 2.0 standard.
How Wordpress can work with WHMCS ?
Steps to configure WHMCS as OAuth server:
Step 1: Get Client Id and Client Secret to connect the WordPress site with WHMCS:
1. Login into WHMCS.
2. Go to Open ID connect tab.
3. Click the Generate New Client API Credentials button.
4. Enter the information requested. ( atleast name is needed to identify the credential set ).
5. Click the Generate Credentials button to create your application's OAuth 2.0 credentials.
6. Upon re-load, look for the Client ID and Client Secret in the Client API Credentials section
Note: Copy Client ID and Client Secret in the Client API Credentials section.
Step 2: Add Redirect URI in WHMCS:
1. Obtain redirect uri from miniOrange OAuth Client plugin.
Select Other as Select Application dropdown under Configure OAuth tab.
Get the Redirect URI from the instructions given in Step3.
2. Go to WHMCS.
3. Navigate to Setup>OpenID Connect.
4. Select the Manage button for your Application. If you haven't created it yet, you can do so by clicking the Generate New Client API Credentials button and filling out the requested information.
5. The Authorized Redirect URIs field on this screen allows you to define the redirect URI you require.
6. If multiple URIs are there, you can add them using the Add another button.
7. Click Save Changes.
Step 3: Configure OAuth Client plugin:
1. Select Other from Select Application dropdown under Configure OAuth tab.
2. Provide Custom App Name. For example: WHMCS.
3. Enter Client ID and Client Secret as obtained in step 1.
4. Enter the scope: clientarea: emails.
5. Get the Authorization Endpoint URI and all other Endpoint URIs from the Discovery document located at
https://www.example.com/whmcs/oauth/openid-configuration.php. Replace example.com with your WHMCS domain.
6. Save it and Test the Configuration.
- Configure Widget to show login button on site.
- Click "login with WHMCS" from Wordpress.
- Enter your url to sign in.
- Enter your login credentials.
- WHMCS will redirect back to wordpress and you will be logged in with single sign on.