Main Website

How to enable social login in your WordPress website?

Most users are familiar with how login and sign-up work at a basic level. The challenge for website owners however is implementing a stable user registration system at the backend.

Thankfully, WordPress has an in-built user registration system. You can easily enable login & sign-up on your website if you wish to.

Along with this, you may also want to enable social login options in your WordPress website. We’re all familiar with how easy user onboarding has become with easy social login options.

Social login is not a native part of WordPress. This means you would need third-party tools and platforms to add more login options for website visitors.

In this article, we’ll cover how you can add social login to your WordPress website.

Plugin or no plugin: Which is the best option for adding social login?

Plugins enable you to achieve any kind of functionality on a WordPress website. However, adding plugins is not always the answer.

Some plugins may clog your database and lower the server’s overall response time. It is a good idea to avoid installing plugins if it can be avoided.

Read: How can plugins affect your website’s speed?

When it comes to social login, you again have the option of installing a plugin or completing the task manually.

If you’re new to WordPress, it can be difficult to add social login to your website manually. User registration is not straightforward and it’s not a good idea to go about changing the core code of the website drastically if you don’t know what you’re doing.

Using a plugin is the best choice in this case.

There are a ton of plugins that allow WordPress site owners to add social login. We will use WP Social for the same.

Step 1: Install and activate the WP Social plugin

It is not easy to enable social login on your website without a plugin. This is why we will use WP Social.

WP Social is a WordPress plugin that enables WordPress users to enable social login options on their websites. Additionally, the plugin is also powered with features that allow you to show social share and counter buttons.

The first step is installing the WP Social plugin on your WordPress website. You can either download the plugin from WordPress and upload it to your website or directly install it within your site.

Once the plugin is installed and activated, you can proceed to enable social login. There are options to enable social login buttons on the pages you like. You can configure these settings easily before enabling login.

Step 2: Choose social login providers

WP Social enables you to connect various prominent social channels for user login. These include platforms like Facebook, Google, LinkedIn, and so on.

It makes sense to enable social login for platforms that your website visitors use. You can find out which platforms your website visitors prefer for social login with a little user research.

Here are the steps you need to follow:

  • Navigate to WP Social > Social Login on your WordPress admin panel.
  • Click on the Providers tab.
  • You will see a whole list of social login providers supported by WP Social.
  • Enable the toggle for the provider you’d like to add to your website.
  • Once you enable the toggle, you will see a Settings button. Click on it.
  • A pop-up will appear explaining the next steps. Let’s see how you can enable Facebook and Google login in the following steps.

Step 3: Enable Facebook login

In order to enable Facebook login, you first need to create an app with your Facebook developer account. Once you do this, you will be able to generate the necessary details to enable Facebook login.

Follow the steps below:

  • Go to the Facebook for Developers page and register via your Facebook account.
  • Confirm your primary email address.
  • Next, choose from a role that best describes you. You can select any role at this point.
  • You will be redirected to your app dashboard. Click on Create app to start.
  • Choose Consumer as your app type. This is the best option if you wish to enable Facebook login for your website.
  • Next, enter your app name. You can enter your website name here. Also, enter an app contact email and choose a Facebook Business account. Selecting a business account is optional.
  • You will now be directed to your new app dashboard. Click on Set up below the Facebook login tile.
  • Choose Web as your choice.
  • Click on Settings in the left panel menu.
  • You will see a Valid OAuth Redirect URIs field. Go to your website, navigate to WP Social> Social login, click on Settings in the Facebook tile, and copy the URL mentioned here.
  • Paste the URL in the Valid OAuth Redirect URIs field.
  • Next, go to Settings > Basic in your Facebook developer account.
  • You will find your App ID and App Secret here. Copy both and return to your WordPress admin panel.
  • In the Facebook pop-up on your WordPress admin panel, go to Settings and paste the App ID and App Secret.
  • Click on Save Changes.
  • Your website will now start supporting Facebook login. You can customize the login button if you like.

Step 4: Enable Google login

Just like you enabled Facebook login, you can similarly use WP Social to allow Google login on your website.

Here are the steps you need to follow:

  • Log in to the Google Cloud platform with your Google account.
  • Click on Create Project.
  • Enter a project name and click on Create.
  • You will be directed to your project dashboard. Click on OAuth Consent Screen.
  • Select a User Type. Since you’d ideally like to open up Google login to anyone who visits the website. In such a case, you should go choose External user. Click on Create.
  • You will next be directed to OAuth Consent Screen. Here enter your application name and contact email. For the application name, you can fill out your website title.
  • Next enter details about your website. Enter your website URL, homepage, privacy policy, and terms of service links.
  • Click on Save.
  • Now select Credentials from the left menu and click on Create Credentials.
  • Select OAuth Client ID.
  • Select Web application as your application type. Next, click on Add URI.
  • You will find the URL in the WP Social module of your WordPress website.
  • Paste the URL here.
  • Click on Create.
  • You will next see your Client ID and Client Secret. Copy both and paste them in their respective fields in your WordPress admin panel.
  • Your website is now enabled for Google login.

You can next configure where you’d like to display social login options on your website. There are also options to customize how your login buttons look, the redirect page, and more.

Social login on AppMySite: Make onboarding effortless

If you’re using an Android and iOS app builder like AppMySite, you can easily add social login options to your app.

AppMySite enables you to connect your app to social login providers like Google and Apple. This way, you can enable app users to log in with their social accounts.

If you already have social login on your WordPress website, it is not guaranteed that the same options would be synced to your app.

Read: Plugin not working with AppMySite? Here’s what you can do

The solution? Enable social login natively for the mobile app you’re building on AppMySite. This way you don’t need to make sure your website’s social login plugin is compatible with AppMySite.

In conclusion

Social login is an essential part of user onboarding on both websites and apps. Generally, user onboarding is a headache for website owners because there’s considerable churn at the login stage.

Making social login available to users reduces churn as visitors & login can sign in with a simple click. WordPress is a seamless CMS that enables you to add social login options with ready-made plugins.

This article uses one such plugin and illustrates how social login can be enabled in your WordPress website.

Related Articles