Commit Graph

122 Commits

Author SHA1 Message Date
François Voron
5a8e3269e3 Bump version 15.0.3 → 15.0.4
* Bump dependencies:
    * `pyjwt[crypto] >=2.11.0,<3.0.0`
    * `python-multipart >=0.0.22,<0.1.0"`
2026-02-05 10:33:33 +01:00
François Voron
81a06798c1 Bump version 15.0.2 → 15.0.3
Bug fixes and improvements
--------------------------

* Add cookie parameters added in 15.0.1 to `FastAPIUsers.get_oauth_router` and `FastAPIUsers.get_oauth_associate_router`. Thanks @jthurner 🎉
2025-12-19 10:37:01 +01:00
François Voron
1df7c1038d Bump version 15.0.1 → 15.0.2
🛡️ Security Fix
----------------

A CSRF vulnerability was identified in the OAuth2 flow. To mitigate this, the authorize endpoint will set a cookie in the response, and this cookie will be expected in the callback request.

In most cases, this change should work out-of-the-box, but in certain scenarios (e.g. cross-domain setups), additional configuration may be required for the cookie to be correctly sent and received. [[Read more](https://fastapi-users.github.io/fastapi-users/dev/configuration/oauth/#csrf-cookie-configuration)]

**Thanks to @davidbors-snyk from [Snyk](https://github.com/snyk) for his research, responisble disclosure, and assistance in fixing this issue.**

Improvements
------------

* Bump dependencies
    * `python-multipart ==0.0.21`
    * `pwdlib[argon2,bcrypt] ==0.3.0`
2025-12-19 08:28:45 +01:00
François Voron
119a5ca40e Bump version 15.0.0 → 15.0.1
Announcement
-------------

FastAPI Users is now in maintenance mode.** While we'll continue to provide security updates and dependency maintenance, no new features will be added. We encourage you to explore the project and use it as-is, knowing it will remain stable and secure.

[[Read more](https://github.com/fastapi-users/fastapi-users/discussions/1543)]

Bug fixes
---------

* Handle expired JWT when handling OAuth callback (#1462). Thanks @mdaffad 🎉
2025-10-25 08:48:05 +02:00
François Voron
35668e29ad Bump version 14.0.2 → 15.0.0
Announcement
-------------

FastAPI Users is now in maintenance mode.** While we'll continue to provide security updates and dependency maintenance, no new features will be added. We encourage you to explore the project and use it as-is, knowing it will remain stable and secure.

Breaking changes
----------------

* Drop Python 3.9 support.
* Drop Pydantic v1 support.

If you still need them, you can install [v14.0.2](https://github.com/fastapi-users/fastapi-users/releases/tag/v14.0.2), which was updated at the same time as this release.
2025-10-25 08:32:14 +02:00
François Voron
04e7b4125b Bump version 14.0.1 → 14.0.2
Announcements
-------------

* This is the last release to support Python 3.9 and Pydantic v1.
* FastAPI Users is now in maintenance mode.** While we'll continue to provide security updates and dependency maintenance, no new features will be added. We encourage you to explore the project and use it as-is, knowing it will remain stable and secure.

Bug fixes and improvements
--------------------------

* Bump dependencies:
    * `email-validator >=1.1.0,<2.4`
    * `redis >=4.3.3,<8.0.0`
2025-10-25 08:00:45 +02:00
François Voron
9d78b2a35d Bump version 14.0.0 → 14.0.1
Improvements
------------

* Bump dependencies
    * `pyjwt[crypto] ==2.10.1`
    * `python-multipart ==0.0.20`
2025-01-04 14:16:19 +01:00
François Voron
38fe6cd530 Bump version 13.0.0 → 14.0.0
Breaking changes
----------------

* Drop Python 3.8 support

Improvements
------------

* Bump dependencies:
    * `python-multipart ==0.0.17`
    * `pwdlib[argon2,bcrypt] ==0.2.1`
    * `pyjwt[crypto] ==2.9.0`
2024-11-03 13:16:05 +00:00
François Voron
61dba2694c Bump version 12.1.3 → 13.0.0
Breaking change
---------------

The underlying password hashing library has been changed from `passlib` to `pwdlib`. This change is breaking only if you were using a custom `CryptContext`. Otherwise, you can upgrade without any changes.

Improvements
------------

* Python 3.12 support
* Password are now hashed using the Argon2 algorithm by default. Passwords created with the previous default algorithm (bcrypt) will still be verified correctly and upgraded to Argon2 when the user logs in.
* Bump dependencies
  * `python-multipart ==0.0.9`
2024-03-11 14:16:20 +01:00
François Voron
ae9f52474b Bump version 12.1.2 → 12.1.3
Improvements
------------

* Bump dependenciess
    * `python-multipart ==0.0.7`
2024-02-05 09:51:04 +01:00
François Voron
ff9fae631c Bump version 12.1.1 → 12.1.2
Bug fixes
---------

* Fix a bug when trying to update user with a `None` password. Thanks @fotinakis 🎉
* Fix static type checking error with `AccessTokenProtocol`. Thanks @Nerixjk 🎉

Improvements
------------

* Bump dependencies
    * `redis >=4.3.3,<6.0.0`
2023-08-26 10:23:06 +02:00
François Voron
a40dc214c4 Bump version 12.1.0 → 12.1.1
Bug fixes and improvements
--------------------------

* Add missing `request` parameter to `UserManager.delete`. Thanks @hgalytoby 🎉
* Remove dummy `__init__` method from models protocols to fix Pylance typing error. Thanks @Nerixjk 🎉
* Bump dependencies:
    * `pyjwt[crypto] ==2.8.0`
2023-08-08 11:47:57 +02:00
François Voron
a3cf1bcee8 Bump version 12.0.0 → 12.1.0
Pydantic V2 support
-------------------

This version brings Pydantic V2 support. Like FastAPI, it keeps backward-compatibility with Pydantic V1, so you can upgrade safely and at your own pace.

Apart your own Pydantic schemas, no changes are needed to your FastAPI Users setup.

Thanks @AdamIsrael for the initial work and research 🎉
2023-07-12 11:06:47 +02:00
François Voron
69f96c1f49 Bump version 11.0.0 → 12.0.0
Breaking changes
----------------

* Drop Python 3.7 support
2023-06-27 15:42:56 +02:00
François Voron
aa5ef9ff3b Bump version 10.4.2 → 11.0.0
Breaking changes
----------------

* Transport classes now always build full response objects instead of using the implicit FastAPI `Response` object.
    * If you were not implementing your own custom transport classes, you will have nothing to do.
    * If you implemented custom classes, you should adapt them so they return a `Response` object. [[Example](8959a12d56/fastapi_users/authentication/transport/bearer.py)]
* Cookie transport now returns a proper `204 No Content` response on logout, which should please OpenAPI Generators. Thanks @caniko 🎉

New features
------------

* `on_after_login` method now accepts `response` in argument, which is the `Response` object built by the transport. [[Documentation](https://fastapi-users.github.io/fastapi-users/latest/configuration/user-manager/#on_after_login)] Thanks @sorasful 🎉

Bug fixes
---------

* Fix #1166: add type hint to /users/{id} routes. Thanks @gegnew 🎉
* Fix `/verify` route returning `null` user ID with Beanie. Thanks @jankadel 🎉
2023-04-29 13:54:02 +02:00
François Voron
bcae3e53ba Bump version 10.4.1 → 10.4.2
Documentation
-------------

* Update documentation for Beanie.
2023-04-14 15:50:07 +02:00
François Voron
525c1866a7 Bump version 10.4.0 → 10.4.1
Bug fixes & improvements
---------

* Fix #1172: missing `is_verified_by_default` argument on `get_oauth_router` method
* Bump dependencies:
    * `python-multipart ==0.0.6`
2023-03-15 13:48:37 +01:00
François Voron
7fbab34f98 Bump version 10.3.0 → 10.4.0
New features
------------

* SQLAlchemy 2.0 support [[Documentation](https://fastapi-users.github.io/fastapi-users/10.4/configuration/databases/sqlalchemy/)]
    * If you need to stay on SQLAlchemy 1.4, you can pin this dependency: `fastapi-users-db-sqlalchemy<5.0.0`
* Allow to set `is_verified` flag to `True` by default after OAuth registration [[Documentation](https://fastapi-users.github.io/fastapi-users/10.4/configuration/oauth/#set-is_verified-to-true-by-default)]

Improvements
------------

* Bump dependencies
    * `httpx-oauth >=0.4,<0.12`
2023-02-13 17:48:26 +01:00
François Voron
0e975c9b95 Bump version 10.2.1 → 10.3.0
Improvements
------------

* Ensure the reset password token can be used only once.
* Change JWT access token structure to use standard `sub` claim instead of `user_id`.
    * ⚠ Existing JWT will be invalidated
* Change verify and reset password tokens structure to use standard `sub` claim instead of `user_id`.
2023-01-16 11:48:32 +01:00
François Voron
1104460533 Bump version 10.2.0 → 10.2.1
Improvements
------------

* Bump `httpx-oauth >=0.4,<0.11`
    * With `httpx-oauth >= 0.10`, the OAuth2 client may be not able to return an email address depending on the OAuth Provider. In this case, the error `OAUTH_NOT_AVAILABLE_EMAIL` is raised during `/callback`. [[Documentation](https://fastapi-users.github.io/fastapi-users/10.2/usage/routes/#get-callback)]
* Enable Python 3.11 support in CI
2022-11-04 09:47:33 +01:00
François Voron
31ea8e4bc2 Bump version 10.1.5 → 10.2.0
New features
------------

* Trigger custom logic after user login with `on_after_login`. [[Documentation]()] Thanks @antont 🎉

Improvements
------------

* Bump dependencies:
    * `email-validator >=1.1.0,<1.4`
    * `pyjwt[crypto] ==2.5.0`
* Use Hatch for environment and package management
2022-10-18 09:02:47 +02:00
François Voron
c7053e4621 Bump version: 10.1.4 → 10.1.5 2022-08-11 13:23:49 +02:00
François Voron
6bc29dd23a Bump version: 10.1.3 → 10.1.4 2022-07-25 10:26:28 +02:00
François Voron
e25b82c090 Bump version: 10.1.2 → 10.1.3 2022-07-23 07:56:58 +00:00
François Voron
184d3ed101 Bump version: 10.1.1 → 10.1.2 2022-07-22 16:07:46 +02:00
François Voron
f38a35ec56 Bump version: 10.1.0 → 10.1.1 2022-06-21 10:01:35 +02:00
François Voron
f5f4ea482e Bump version: 10.0.7 → 10.1.0 2022-06-21 08:04:17 +02:00
François Voron
2a6128c9fc Bump version: 10.0.6 → 10.0.7 2022-06-07 08:49:15 +02:00
François Voron
b59fc794f3 Bump version: 10.0.5 → 10.0.6 2022-05-27 09:49:39 +02:00
François Voron
8121ad0b8c Bump version: 10.0.4 → 10.0.5 2022-05-25 08:50:21 +02:00
François Voron
e8635d9132 Bump version: 10.0.3 → 10.0.4 2022-05-19 14:45:22 +02:00
François Voron
2477fdffc1 Bump version: 10.0.2 → 10.0.3 2022-05-10 08:42:09 +02:00
François Voron
d0d1a0dea1 Bump version: 10.0.1 → 10.0.2 2022-05-06 15:04:15 +02:00
François Voron
15ce3eaab6 Bump version: 10.0.0 → 10.0.1 2022-05-06 13:20:33 +02:00
François Voron
78be936297 Put exceptions in a dedicated module to avoid circular imports 2022-05-06 13:17:22 +02:00
François Voron
685984e6e3 Bump version: 9.3.2 → 10.0.0 2022-05-05 14:58:45 +02:00
François Voron
72aa68c462 Native model and generic ID (#971)
* Use a generic Protocol model for User instead of Pydantic

* Remove UserDB Pydantic schema

* Harmonize schema variable naming to avoid confusions

* Revamp OAuth account model management

* Revamp AccessToken DB strategy to adopt generic model approach

* Make ID a generic instead of forcing UUIDs

* Improve generic typing

* Improve Strategy typing

* Tweak base DB typing

* Don't set Pydantic schemas on FastAPIUsers class: pass it directly on router creation

* Add IntegerIdMixin and export related classes

* Start to revamp doc for V10

* Revamp OAuth documentation

* Fix code highlights

* Write the 9.x.x ➡️ 10.x.x migration doc

* Fix pyproject.toml
2022-05-05 14:51:19 +02:00
François Voron
b7734fc8b0 Bump version: 9.3.1 → 9.3.2 2022-05-05 11:56:39 +02:00
François Voron
05042b5a1e Bump version: 9.3.0 → 9.3.1 2022-04-21 11:23:10 +02:00
François Voron
6ba70bdbc6 Bump version: 9.2.6 → 9.3.0 2022-03-22 15:12:19 +01:00
François Voron
0db2ce9d9e Bump version: 9.2.5 → 9.2.6 2022-03-16 09:05:43 +01:00
François Voron
06ad0371fb Bump version: 9.2.4 → 9.2.5 2022-02-18 11:11:55 +01:00
François Voron
29cfe8ae5e Bump version: 9.2.3 → 9.2.4 2022-02-07 08:57:19 +01:00
François Voron
e3923d14b9 Bump version: 9.2.2 → 9.2.3 2022-02-01 09:29:58 +01:00
François Voron
0583d7c88e Bump version: 9.2.1 → 9.2.2 2022-01-15 11:22:59 +01:00
Alexandr Makurin
e6125905e0 Fix #865 (#866)
* Fix #865

* Add # pragma: no cover to all try blocks

* Fix same issue with root module
2022-01-15 10:50:06 +01:00
François Voron
0a8661b762 Bump version: 9.2.0 → 9.2.1 2022-01-10 12:58:48 +01:00
François Voron
896813d278 Bump version: 9.1.1 → 9.2.0 2022-01-04 16:03:47 +01:00
François Voron
d469bace6e Bump version: 9.1.0 → 9.1.1 2022-01-03 11:29:05 +01:00
François Voron
96a086c60f Bump version: 9.0.1 → 9.1.0 2021-12-31 14:44:07 +01:00