Using Google for authentication

Just like we did for Facebook, we can integrate our application to enable login using Google.

Getting ready

We will start by building over the last recipe. It is easy to just implement Google authentication by leaving out the Facebook auth (by leaving out the Facebook-specific parts).

Now, we have to create a project from the Google developer console (https://console.developers.google.com). Then, we have to create a client ID for the web application; this ID will provide the credentials needed for OAuth to work. The following screenshot should help:

Getting ready

How to do it…

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

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.