Introduction
To keep things simple and flexible, Flask, by default, does not provide a mechanism for authentication. It always has to be implemented by us, the developers, as per our and the application's requirements.
Authenticating users for your application can be done in multiple ways. It can be done using a simple session-based implementation or a more secure approach using the Flask-Login extension. We can also implement authentication by integrating with popular third-party services such as OpenID or social logins such as Facebook, Google, and so on. In this chapter, we will go through all of these methods.