Nowadays, social login is usually used for faster registration, and 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. Especially, 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) which are 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:
Step 1: First of all, let’s get access to https://github.com/settings/applications/new and click Create an account.
Step 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.
Step 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.
Step 4: You’re almost done with the registration process. 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 is used to force all users back through the authorization flow before they can use your application again, and the all created SSH keys will also be deleted. You have to be careful because the action you made can’t be undone. The second option allows re-configuring your Client secret and it requires you to update any application using old secret.
At the same page, you are able to see your application information that has just been created. You can either change the information or delete the whole application.
Step 5: It is the final step; 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!