Flask-Security
Quickly add security features to your Flask application.
Decision gist · record as of 2026-08-14
Yes. Flask-Security is actively maintained, has no known vulnerabilities, low install friction, and provides a comprehensive, OWASP-aligned authentication and authorization layer for Flask applications. It's suitable for production use and backed by the Pallets Community Ecosystem. Install it if you need to add user management and security features to a Flask app without implementing these systems yourself.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; typical setup requires a database and SQLAlchemy integration for user/role storage.
- Low install friction with a pure-Python wheel distribution.
- Actively maintained with a release 2 days ago and recent commits; part of the Pallets Community Ecosystem with 698 repository stars.
License · maintenance · safety
permissive license (permissive) — Licensed under MIT (permissive), allowing use in commercial and proprietary projects with minimal restrictions.
last release 2026-08-12 (2 days) · last repo commit 2026-08-12 · 698 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 158,183 downloads/mo, #10,732 on PyPI
Alternatives
Verify before relying
pip install Flask-Security
from flask import Flask
from flask_security import Security, SQLAlchemyUserDatastore
app = Flask(__name__)
app.config['SECRET_KEY'] = 'your-secret-key'
# Configure datastore and Security
user_datastore = SQLAlchemyUserDatastore(db, User, Role)
security = Security(app, user_datastore)- Specific OAuth provider support beyond authlib integration mentioned in description
- Performance characteristics under high-concurrency authentication load
- Compatibility matrix with specific Flask and dependency versions beyond Python 3.10+
What it is and what it does
Flask-Security is a Flask extension that bundles authentication, authorization, and user management into a single package. It provides ready-to-use features for user registration, login, password reset, role-based access control, and modern authentication standards like OAuth social login, WebAuthn/passkey support, and multi-factor authentication via SMS, email, or authenticator apps. The package is designed around OWASP best practices and reduces reliance on abandoned dependencies by bundling common use cases.
The extension integrates with Flask-Login for session management, Flask-Principal for authorization, Flask-WTF for form security, and email-validator for email handling. It's actively maintained as part of the Pallets Community Ecosystem (the organization behind Flask itself) and has evolved since its original 2012 release to support modern authentication patterns including unified signin, freshness decorators for sensitive operations, and email normalization.
Use it for
- Add user registration and login to a Flask web application without building authentication from scratch
- Implement role-based access control to restrict views and resources to specific user groups
- Enable multi-factor authentication (SMS, email, or authenticator apps) for sensitive applications
- Integrate social login (OAuth) so users can sign in via external providers like Google or GitHub
- Support passwordless or username-based authentication as an alternative to email-based login
- Add WebAuthn/passkey support for modern, phishing-resistant authentication
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Flask-Security is actively maintained, has no known vulnerabilities, low install friction, and provides a comprehensive, OWASP-aligned authentication and authorization layer for Flask applications. It's suitable for production use and backed by the Pallets Community Ecosystem. Install it if you need to add user management and security features to a Flask app without implementing these systems yourself.
Install
flask-security on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a release 2 days ago and recent commits; part of the Pallets Community Ecosystem with 698 repository stars. Requires Python 3.10 or later.
Requires Python 3.10 or later; typical setup requires a database and SQLAlchemy integration for user/role storage.
License in practice
Licensed under MIT (permissive), allowing use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install Flask-Security
from flask import Flask
from flask_security import Security, SQLAlchemyUserDatastore
app = Flask(__name__)
app.config['SECRET_KEY'] = 'your-secret-key'
# Configure datastore and Security
user_datastore = SQLAlchemyUserDatastore(db, User, Role)
security = Security(app, user_datastore)
Verify before relying
- Specific OAuth provider support beyond authlib integration mentioned in description
- Performance characteristics under high-concurrency authentication load
- Compatibility matrix with specific Flask and dependency versions beyond Python 3.10+
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packagesFlaskFlask-LoginFlask-PrincipalFlask-WTFemail-validatormarkupsafelibpasswtforms |
| Maintenance | Actively maintained 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 158,183 / month, #10,732 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: FlaskIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules |
Evidence: flask_security-5.8.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “flask authentication authorization”
- Flask-SecurityFlask-Security adds authentication, authorization, and user…
- Flask-PrincipalFlask-Principal provides identity and permission management for Flask…
- Flask-Security-TooAdds user authentication, authorization, and role-based access…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also Flask-Principal · Flask-Security-Too · Flask-Caching · Flask-Session · Flask-WTF · Flask-Dance · supertokens-python · Flask-Mail · flask-oidc · Flask