Skip to content

Releases: fastapi-users/fastapi-users

v10.0.6

27 May 07:51
b59fc79
Compare
Choose a tag to compare

Security fix

v10.0.5

25 May 06:52
8121ad0
Compare
Choose a tag to compare

Bug fixes

  • Fix #1000: using Beanie, id was null in API responses. Thanks @JimScope 🎉

v10.0.4

19 May 12:45
e8635d9
Compare
Choose a tag to compare

Improvements

  • Bump dependencies:
    • fastapi >=0.65.2,<0.79.0

v10.0.3

10 May 06:43
2477fdf
Compare
Choose a tag to compare

Improvements

  • Bump dependencies:
    • fastapi >=0.65.2,<0.78.0
    • email-validator >=1.1.0,<1.3

v10.0.2

06 May 13:10
d0d1a0d
Compare
Choose a tag to compare

Bug fixes

  • Set Pydantic orm_mode on BaseUser schema

v10.0.1

06 May 11:21
15ce3ea
Compare
Choose a tag to compare

Bug fixes

  • Fix generic typing on AuthenticationBackend class
  • Move exceptions in a dedicated module to avoid circular imports (related to #978)

v10.0.0

05 May 13:19
685984e
Compare
Choose a tag to compare

Breaking changes

Version 10 marks important changes in how we manage User models and their ID.

Before, we were relying only on Pydantic models to work with users. In particular the current_user dependency would return you an instance of UserDB, a Pydantic model. This proved to be quite problematic with some ORM if you ever needed to retrieve relationship data or make specific requests.

Now, FastAPI Users is designed to always return you a native object for your ORM model, whether it's an SQLAlchemy model or a Beanie document. Pydantic models are now only used for validation and serialization inside the API.

Before, we were forcing the use of UUID as primary key ID; a consequence of the design above. This proved to be quite problematic on some databases, like MongoDB which uses a special ObjectID format by default. Some SQL folks also prefer to use traditional auto-increment integers.

Now, FastAPI Users is designed to use generic ID type. It means that you can use any type you want for your user's ID. By default, SQLAlchemy adapter still use UUID; but you can quite easily switch to another thing, like an integer. Beanie adapter for MongoDB will use native ObjectID by default, but it also can be overriden.

READ THE MIGRATION PATH

Documentation improvements

  • From this day, the documentation is versioned. It means that you'll be able read the documentation for older versions, starting at v9.3. There is a menu switch on top!

v9.3.2

05 May 09:57
b7734fc
Compare
Choose a tag to compare

Improvements

  • Add version guards for DB adapters in prevision of v10

v9.3.1

21 Apr 09:25
05042b5
Compare
Choose a tag to compare

Bug fixes and improvements

  • Fix a bug where OAuth accounts could collide if providers use the same ID. Thanks @ricfri 🎉
  • Bump dependencies:
    • httpx-oauth >=0.4,<0.7

v9.3.0

22 Mar 14:17
6ba70bd
Compare
Choose a tag to compare

Fixes and improvements

  • Allow to use RS256/ES256 algorithms to sign JWT. [Documentation] Thanks @jtv8 🎉
  • Allow to customize password hash strategy and algorithms [Documentation]
    • ⚠️ For SQLAlchemy (v3.0.0) and Tortoise ORM (v2.0.0), models have been updated so that the password_hash column can store longer strings. You'll likely need to perform a database migration.