Installing Flask-Login

Flask-Login is a lightweight extension that handles logging users in and out of the site. From the project's documentation, Flask-Login will do the following:

  • Log users in and out of the site
  • Restrict views to the logged-in users
  • Manage cookies and the "remember me" functionality
  • Help protect user session cookies from being stolen

On the other hand, Flask-Login will not do the following:

  • Make any decisions about the storage of user accounts
  • Manage usernames, passwords, OpenIDs, or any other form of credentials
  • Handle tiered permissions or anything beyond logged in or logged out
  • Account registration, activation, or password reminders

The takeaway from these lists is that Flask-Login can best be thought of as a session manager. It simply ...

Get Learning Flask Framework 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.