Configure Manage External Authentications In cPanel/WHM
WHM can allow your users to log in to their cPanel accounts using External Authentications. Services provided by Facebook, Google and PayPal to name a few. This would be considered safer than allowing your users to use a password to log in. In WHM the Manage External Authentications cPanel interface can help you configure this. Allowing External Authentications on your WHM server. You mitigate the risk of a user having their password compromised. So, in turn, prevents a website hack.
Once a user has linked their cPanel account to the External Authenticator. We would advise any user using this service to change their cPanel password. Use the in-built password configurator. Just keep that password safe in case it’s ever needed.
Configure Manage External Authentications cPanel
login to WHM and under the Security Center settings click the “Manage External Authentications” and finally the “Configure” link at the top. Here you can see a full list of External Authenticators you can set up. We will concentrate on the FaceBook authenticator.
Click the “Configure” link next to the FaceBook Authenticator options and scroll right to the bottom. You can make changes to the buttons at the top if you wish but for this article, we are going to skip this. You will notice the three sections we are interested in;
- Redirect URIs
- App ID
- App Secret
Before proceeding further ensure you have an SSL Certificate configured on your Hostname. You can follow our guide on this located here to complete that.
Create A New Facebook App
Next, navigate to the Facebook Developers site, https://developers.facebook.com/ log in and under “My Apps” click create a new App, Fill out the details.
Finally, in your App under “Settings” on the left click “Basic” and on the right your App details will appear. Notice at the top you have “App ID” and “App Secret” Proceed to fill out all of the information on this page.
Add API Details
Get your App ID and App Secret, These details need to be placed at the bottom of the Facebook configuration settings in WHM. Save all the changes on this page.
Next, on the left, you will see “Products” click the plus symbol and on the top of the page on the right, you will see “Let people log in with their Facebook account” Click the “Set-Up” button.
Click “Web” then fill out your server details. You should add the details like https://your_host_name.your-domain.com AND https://yourdomain.com. Click continue on the next steps until you come to step 6 which is then complete.
Under “Products” you will now see the “Facebook Login” section, click “Settings”. Under the “Valid OAuth Redirect URIs” section enter the URLs that are displayed in WHM and the “Redirect URIs”. Enter them one-by-one then click save at the bottom.
At the top of the page make your App live by sliding the toggle to the right. Assuming you added your App ID and App Secret in WHM and saved them as instructed in the previous steps. Navigate to your server’s cPanel login screen and hit the Facebook login button.
cPanel Login
Here you will be asked to Log into Facebook and then transferred back to the server to log in to your local cPanel account. This connects your cPanel account with your Facebook account and only needs to be completed once.
So that’s the process for setting up Facebook logins with a cPanel and WHM server complete. You can repeat the steps on different sites like PayPal and Google to configure more services for Single Sign On.