Using Twitter for authentication

OAuth was actually born while writing the OpenID API for Twitter. In this recipe, we will integrate Twitter login with our application.

Getting ready

We will continue by building over the Using Google for authentication recipe. It is easy to just implement Twitter auth by leaving out specific parts from Facebook and/or Google authentication.

Now, we have to create an application from the Twitter Application Management page (https://apps.twitter.com/). It will automatically create API key and API secret for us to use. Have a look at the following screenshot:

Getting ready

How to do it…

As always, we will first start with the configuration ...

Get Flask Framework Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.