In this Tutorial you will learn how to implement social authentication in your yii 2 framework website , for this we will be uisng HybridAuth . HybridAuth is an open source library that allows developers to integrate with multiple third-party social networks, and enables developers to make their application more social. For our purposes, we’re going to utilize HybridAuth to impersonate a given user (with their permission, of course) and submit content on their behalf upon their request. In this tutorial we will set up twitter with our website , so let’s get started

Setting up a Twitter application

Before we start using HybridAuth though, we first need to set up a Twitter application and obtain our OAuth credentials. These credentials will allow our application to communicate securely with Twitter, and enable us to sign in and post as our users. The steps are as follows: