Analysis updated 2026-07-03
Add user authentication to a Flask app so only logged-in users can access certain pages.
Implement a 'remember me' feature that keeps users signed in after closing and reopening their browser.
Connect your own database or storage system to Flask-Login by defining a simple user object.
| maxcountryman/flask-login | cleardusk/3ddfa | calesthio/openmontage | |
|---|---|---|---|
| Stars | 3,680 | 3,680 | 3,681 |
| Language | Python | Python | Python |
| Setup difficulty | easy | hard | moderate |
| Complexity | 2/5 | 4/5 | 3/5 |
| Audience | developer | researcher | vibe coder |
Figures from each repo's GitHub metadata at analysis time.
Requires an existing Flask app and a user storage backend of your choice.
Flask-Login is a Python library for the Flask web framework that handles the mechanics of logging users in and out of a web application. When someone visits a site built on Flask, Flask-Login tracks whether they are signed in across multiple page requests, a task that would otherwise require writing a lot of repetitive session-handling code from scratch. The library does not come with a built-in user database or a fixed way of storing passwords. Instead, it asks the developer to define a user object with a few standard methods, then provide a function that can look up a user by their ID. This design means it works equally well with SQL databases, document stores, flat files, or any other storage the developer prefers. Once connected to a Flask app, Flask-Login provides a small set of tools that cover most login scenarios. A login_required decorator blocks access to any route unless the visitor is authenticated, redirecting anonymous users elsewhere. The login_user and logout_user functions handle starting and ending sessions. A current_user proxy is available anywhere in a request, letting templates and views check who is signed in without passing the user object around manually. The library also supports a "remember me" option that keeps a user logged in across browser restarts through a long-lived cookie. This is opt-in, and the developer controls how long the session lasts. Flask-Login has been around for many years and is a widely used choice for Flask applications that need basic authentication without pulling in a larger framework. Full documentation is available at flask-login.readthedocs.io.
A Python library that handles user login and logout for Flask web apps, tracking who is signed in across page requests without a built-in database.
Mainly Python. The stack also includes Python, Flask.
License details not mentioned in the explanation.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.