Chapter 6. Authenticating in Flask

Authentication is an important part of any application, be it web-based, desktop, or mobile. Each kind of application has certain best practices of handling user authentication. In web-based applications, especially SaaS-based applications, this process is of utmost importance, as it acts as the thin red line between the application being secure and unsecure.

In this chapter, we will cover the following recipes:

  • Simple session-based authentication
  • Authenticating using the Flask-Login extension
  • Using OpenID for authentication
  • Using Facebook for authentication
  • Using Google for authentication
  • Using Twitter for authentication

Introduction

To keep things simple and flexible, Flask, by default, does not provide a mechanism ...

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.