OAuth was actually born while writing the OpenID API for Twitter. In this recipe, we will integrate Twitter login with our application.
Using Twitter for authentication
Getting ready
We will continue by building over the Using Google for authentication recipe. It is easy to implement Twitter authentication – simply leave out the Facebook or Google-specific parts from the previous authentication recipes.
First, we have to create an application from the Twitter Application Management page (https://developer.twitter.com/en/apps). It will automatically create Consumer API keys (API key and API secret key) for us to use, as shown in the following screenshot: