Social login is popular for faster registration, as you can save the time of remembering all your accounts. However, before creating a social login in Magento 2, you have to configure API of other social networks such as Yahoo, Facebook, Instagram, Pinterest, etc. In the previous post, we have shown you about how to configure Foursquare API in Magento 2. Specifically in this post, we will show you the way to configure GitHub API in Magento 2.
When entering GitHub, you need to create an external application to connect your website to GitHub API. Then, application ID and secret (Client ID and secret), or called application credentials, are all that we need. With this external application, your website will be linked to GitHub API. And these credentials play a major role in making GitHub users get access to your site.
To Configure GitHub API in Magento 2, let’s follow these steps:
1. First of all, let’s get access to https://github.com/settings/applications/new and click Create an account.
2. The Join GitHub screen will show up, and all you have to do is following the required steps which are Create personal account, Choose your plan and Tailor your experience.
3. After finishing all the steps above, you will see the screen of Register a new OAuth application, and you have to fill information in every blank in order to move on to the next step. The information includes Application name that is recognizable by users, Homepage URL, Application description and Authorization callback URL. When you’re done, please click on Register application.
4. The registration process is almost complete! This step will show you your Client ID and Client Secret with two options to choose from, namely Revoke all user tokens and Reset client secret. The first alternative forces all users back through the authorization flow before they can use your application again, and all created SSH keys will vanish. You have to be careful because any action you take is irreversible. The second option allows re-configuring your Client secret and it requires you to update any application using old secret.
On the same page, you will see your newly-created application information. You can either change the information or delete the whole application.
5. This is the final step to configure Github API in Magento 2. You need to copy and insert Client Id and Client Secret into API fields in Magento Admin in this link.
We have shown you how to configure GitHub API in Magento 2. If you want to ask for support, leave a comment or send us an email. If you want to know more about how to configure the API of other social networks in Magento 2, keep following us!