| 1 |
.. rst-class:: hide-header |
| 2 |
|
| 3 |
|
| 4 |
Welcome to Flask-Security |
| 5 |
========================= |
| 6 |
|
| 7 |
.. image:: _static/logo-owl-full-240.png |
| 8 |
:alt: Flask-Security: add a drop of security to your Flask application. |
| 9 |
:align: left |
| 10 |
:width: 100% |
| 11 |
:target: https://github.com/pallets-eco/flask-security |
| 12 |
|
| 13 |
|
| 14 |
Flask-Security allows you to quickly add common security mechanisms to your |
| 15 |
Flask application. They include: |
| 16 |
|
| 17 |
1. Authentication (via session, Basic HTTP, or token) |
| 18 |
2. User registration (optional) |
| 19 |
3. Role and Permission management |
| 20 |
4. Account activation (via email confirmation) (optional) |
| 21 |
5. Password management (recovery and resetting) (optional) |
| 22 |
6. Username management (configuration, recovery, change) (optional) |
| 23 |
7. Two-factor authentication via email, SMS, authenticator (optional) |
| 24 |
8. Passkey (Webauthn) Support (optional) |
| 25 |
9. Social Login (OAuth) for authentication (e.g. google, github, ..) (optional) |
| 26 |
10. Change email (optional) |
| 27 |
11. Login tracking (optional) |
| 28 |
12. JSON/Ajax Support |
| 29 |
|
| 30 |
|
| 31 |
Many of these features are made possible by integrating various Flask extensions |
| 32 |
and libraries. They include: |
| 33 |
|
| 34 |
* `Flask-Login <https://flask-login.readthedocs.org/en/latest/>`_ |
| 35 |
* `Flask-Mail <https://pypi.org/project/Flask-Mail/>`_ |
| 36 |
* `Flask-Principal <https://pypi.org/project/Flask-Principal/>`_ |
| 37 |
* `Flask-WTF <https://pypi.org/project/Flask-WTF/>`_ |
| 38 |
* `itsdangerous <https://pypi.org/project/itsdangerous/>`_ |
| 39 |
* `passlib <https://pypi.org/project/libpass/>`_ |
| 40 |
* `QRCode <https://pypi.org/project/qrcode/>`_ |
| 41 |
* `webauthn <https://pypi.org/project/webauthn/>`_ |
| 42 |
* `authlib <https://pypi.org/project/Authlib/>`_ |
| 43 |
|
| 44 |
Additionally, it assumes you'll be using a common library for your database |
| 45 |
connections and model definitions. Flask-Security supports the following Flask |
| 46 |
extensions out of the box for data persistence: |
| 47 |
|
| 48 |
1. `Flask-SQLAlchemy <https://pypi.python.org/pypi/flask-sqlalchemy/>`_ |
| 49 |
2. `MongoEngine <https://pypi.python.org/pypi/mongoengine/>`_ |
| 50 |
3. `Peewee Flask utils <https://docs.peewee-orm.com/en/latest/peewee/playhouse.html#flask-utils>`_ |
| 51 |
4. `PonyORM <https://pypi.python.org/pypi/pony/>`_ - NOTE: not currently working - Help needed!. |
| 52 |
5. `SQLAlchemy sessions <https://docs.sqlalchemy.org/en/20/orm/session_basics.html>`_ |
| 53 |
6. `Flask-SQLAlchemy-Lite <https://pypi.python.org/pypi/flask-sqlalchemy-lite/>`_ |
| 54 |
|
| 55 |
|
| 56 |
Getting Started |
| 57 |
---------------- |
| 58 |
|
| 59 |
.. toctree:: |
| 60 |
:maxdepth: 2 |
| 61 |
|
| 62 |
installation |
| 63 |
quickstart |
| 64 |
features |
| 65 |
configuration |
| 66 |
models |
| 67 |
|
| 68 |
Customizing and Usage Patterns |
| 69 |
------------------------------- |
| 70 |
|
| 71 |
.. toctree:: |
| 72 |
:maxdepth: 2 |
| 73 |
|
| 74 |
customizing |
| 75 |
webauthn |
| 76 |
two_factor_configurations |
| 77 |
spa |
| 78 |
patterns |
| 79 |
|
| 80 |
API |
| 81 |
--- |
| 82 |
`OpenApi Spec`_ |
| 83 |
|
| 84 |
|
| 85 |
.. _OpenApi Spec: _static/openapi_view.html |
| 86 |
|
| 87 |
.. toctree:: |
| 88 |
:maxdepth: 2 |
| 89 |
|
| 90 |
api |
| 91 |
|
| 92 |
Additional Notes |
| 93 |
---------------- |
| 94 |
|
| 95 |
.. toctree:: |
| 96 |
:maxdepth: 2 |
| 97 |
|
| 98 |
contributing |
| 99 |
changelog |
| 100 |
authors |