Most people aren’t patient enough to fill lots of information when signing up for a website or an online store. That’s why many ecommerce stores integrate social logins which allow a user to use their existing social media credentials to access and services to the store.
It’s important to allow users to sign in to your Magento store using their social networking accounts to provide them a better experience. This technique also gets you in-depth insight about the user since they tend to share more information with their friends and family. With Facebook, Twitter, Google, and LinkedIn being some of the most popular networking platforms, today, we’ll learn how to add social logins to Magento 2.
In this tutorial, we will be using Magento 2 Social Login Extension by Mageplaza, which is a free and useful Magento 2 extension. By using this extension, your users will just need to click on the social platform button, and the rest will be taken care of automatically.
Download & Install The Extension
Let’s start by downloading and installing the Magento 2 Social Login Extension:
- First, visit the Mageplaza website and download the zip file of the extension. (You can also avail the great discount of 10% on any Mageplaza Extension.)
- Unzip the extension file, and you will get app folder in it.
- Login to your web hosting server via SFTP or any other file management source and upload that app folder to the root of your Magento 2 store.
- Now connect to your hosting server using SSH and run the following CLI commands to finish the installation of extension:
rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:db-schema:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
Configure the Extension
Now, it’s time to set up the extension. Log in to your Magento 2 Admin Panel, and using the left menu bar, go to MAGEPLAZA > Configuration > Social Login and expand the General section.
Here, you can see an option to enable the extension. Just select Yes using the drop-down and hit Save Config button.
You can also customize it with other available options like change the popup effect, color or add custom CSS to it.
To configure Facebook with your extension, you will require a Facebook App Id and Facebook App Secret. To get this information, login to your Facebook account and go to the Facebook for Developers section.
Tap Add a New App button, enter the relevant information, and click Create App ID button.
From your Application Dashboard, navigate to Settings and tap Add Platform at the bottom.
Select Website, enter the Site URL and hit Save Changes button to apply changes.
Copy Facebook App ID and Facebook App Secret and navigate to Magento 2 Admin Panel > MAGEPLAZA > Configuration > Social Login > Facebook. Enable it and paste the information in relevant fields.
Same as Facebook, the extension requires Consumer Key and Consumer Secret for Twitter Application. Just go to Twitter Application Management and follow the instructions to create a new app.
Now tap Keys and Access Tokens tab and copy Consumer Key (API Key) and Consumer Secret (API Secret) and paste it in the Twitter section of the extension.
Configure More Social Networks
If you want to add more social login options for your users, just expand the desired section, and you’ll see “Create app here” text. Click on it and follow the onscreen instructions.
You are now done with adding social login options to your Magento 2 store. Visit the front view of your store, tap Sign in from the top-right corner and use the social button to sign in to your Magento 2 store.
Adding social login in Magento 2 store can speed up the registration process. It also saves you and your users a lot of time. With this tutorial, you can successfully install Mageplaza Magento 2 Social Login free extension on your Magento 2 store. Talking about easy access, Cloudways offers you the ease of hosting your Magento stores on any of the five top cloud providers, i.e., AWS, DigitalOcean, Vultr, GCE, and Kyup. You can also sign up using your LinkedIn, Google, or Git accounts.
Start Creating Web Apps on Managed Cloud Servers Now!
Easy Web App Deployment for Agencies, Developers and E-Commerce Industry