785 Commits

Author SHA1 Message Date
2ffb7006ff [Issue #1312]: full examples use lifespan instead of on_startup (#1363)
* docs(examples): full examples use lifespan instead of on_startup for database initialization

* Update beanie.md

Replaced the annotations on the notes that I missed
2024-03-05 09:09:49 +01:00
0df82afb32 docs: add mdonnellyli as a contributor for doc (#1358)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-02-20 08:42:46 +01:00
d6e337a2e5 Create a user programmatically documentation - change example to return things. (#1356)
* Changed method to return user or raise an exception

* Re-raise UserAlreadyExists exception instead of creating a new one.
2024-02-20 08:42:23 +01:00
3e38e1154c Update README 2024-02-15 10:04:12 +01:00
1987d5afff docs: add raindata5 as a contributor for doc (#1354)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2024-02-15 09:58:19 +01:00
87c73e974c Update cookie.md to reflect correct status code on login (#1349)
* Update cookie.md to reflect correct status code on login

* Add complete HTTP response code

* Update HTTP response code in docs for cookie transport
2024-02-15 09:57:30 +01:00
ad096aea13 Update Polar badge 2024-02-15 09:31:59 +01:00
4ee11be696 Update Polar badge 2024-02-15 09:26:56 +01:00
e3cdda521c Update FUNDING.yml 2024-02-15 09:14:42 +01:00
a49a4ecb97 Update funding settings 2024-02-14 17:25:13 +01:00
ae9f52474b Bump version 12.1.2 → 12.1.3
Improvements
------------

* Bump dependenciess
    * `python-multipart ==0.0.7`
v12.1.3
2024-02-05 09:51:04 +01:00
3d42d57556 Upgrade Codecov action 2024-02-05 09:35:01 +01:00
a49f7f49c4 Update README 2024-02-05 09:24:09 +01:00
8ef6699ab7 Add VS Code settings 2024-02-05 09:20:45 +01:00
9d07464be1 Upgrade linting configuration 2024-02-05 09:20:38 +01:00
cd5eaf1d51 Bump python-multipart from 0.0.6 to 0.0.7 (#1347)
Bumps [python-multipart](https://github.com/andrew-d/python-multipart) from 0.0.6 to 0.0.7.
- [Changelog](https://github.com/andrew-d/python-multipart/blob/master/CHANGELOG.md)
- [Commits](https://github.com/andrew-d/python-multipart/compare/0.0.6...0.0.7)

---
updated-dependencies:
- dependency-name: python-multipart
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-05 09:10:31 +01:00
155d161bfc Update email-validator requirement from <2.1,>=1.1.0 to >=1.1.0,<2.2 (#1311)
Updates the requirements on [email-validator](https://github.com/JoshData/python-email-validator) to permit the latest version.
- [Release notes](https://github.com/JoshData/python-email-validator/releases)
- [Changelog](https://github.com/JoshData/python-email-validator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/JoshData/python-email-validator/compare/v1.1.0...v2.1.0)

---
updated-dependencies:
- dependency-name: email-validator
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-28 09:09:39 +01:00
e646721641 docs: add hgalytoby as a contributor for question (#1329)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-12-28 09:09:04 +01:00
fe5555c190 docs: add lifengmds as a contributor for financial (#1328)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-12-28 09:08:03 +01:00
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`
v12.1.2
2023-08-26 10:23:06 +02:00
1c10319c20 Bump Redis dependency 2023-08-26 10:15:15 +02:00
fe4351457f docs: add fotinakis as a contributor for code, and bug (#1276)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-08-26 10:14:53 +02:00
0bf4e218f0 Fix password update None handling. (#1275) 2023-08-26 10:14:26 +02:00
830898c5bf Fix #1262: Remove __init__ in models protocols to fix typing error with Pylance (#1266)
Replication of original fix for #1262 to the AccessTokenProtocol class.
2023-08-10 09:13:59 +02:00
381cd1a9b6 docs: add Nerixjk as a contributor for bug, and code (#1268)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-08-10 09:05:34 +02:00
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`
v12.1.1
2023-08-08 11:47:57 +02:00
54590167a6 Fix #1262: Remove __init__ in models protocols to fix typing error with Pylance 2023-08-08 11:40:33 +02:00
aa4344f793 Bump pyjwt[crypto] from 2.7.0 to 2.8.0 (#1254)
Bumps [pyjwt[crypto]](https://github.com/jpadilla/pyjwt) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/jpadilla/pyjwt/releases)
- [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/jpadilla/pyjwt/compare/2.7.0...2.8.0)

---
updated-dependencies:
- dependency-name: pyjwt[crypto]
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-26 13:10:56 +02:00
61fad8ce38 docs: add hgalytoby as a contributor for bug (#1259)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-07-26 13:10:13 +02:00
fe932fee19 Add request parameter to delete user method (#1258)
* add request parameter to delete_user method.

* Docs: Add request parameter to docstring
2023-07-26 13:10:03 +02:00
cd325da2e9 Fix auth full example missing oauth optional dependency 2023-07-14 09:23:27 +02:00
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 🎉
v12.1.0
2023-07-12 11:06:47 +02:00
d9924c9e66 docs: add AdamIsrael as a contributor for code (#1250)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-07-12 11:06:23 +02:00
49ea718a6c Merge pull request #1249 from fastapi-users/pydantic-v2
Pydantic V2 support
2023-07-12 11:02:44 +02:00
5b6d5d471a FIx CI to support Hatch test environment 2023-07-12 10:56:28 +02:00
a7b77cac73 Create a dedicated test environment and fix coverage/typing issues to support Pydantic V2 2023-07-12 10:54:51 +02:00
e17bb609ae Add compatibility layer for Pydantic V2 2023-07-12 10:44:22 +02:00
d2a633d2f5 Setup Hatch matrix to support Pydantic V1 and V2 2023-07-12 09:55:47 +02:00
3bf0f888ee Fix typo (#1248) 2023-07-12 09:33:54 +02:00
69f96c1f49 Bump version 11.0.0 → 12.0.0
Breaking changes
----------------

* Drop Python 3.7 support
v12.0.0
2023-06-27 15:42:56 +02:00
d7b5f9445a Bump optional dependencies 2023-06-27 15:41:32 +02:00
0605920c21 Drop Python 3.7 support 2023-06-27 15:30:38 +02:00
3c742830c0 docs: add justhomas as a contributor for code (#1236)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-06-23 10:38:10 +02:00
b1bce5d765 Add AsyncIterator to the DependencyCallable type (#1235)
* add AsyncIterator to the DependencyCallable type

* fix linting issues
2023-06-23 10:38:00 +02:00
0ad2426a08 Bump pyjwt[crypto] from 2.6.0 to 2.7.0 (#1211)
Bumps [pyjwt[crypto]](https://github.com/jpadilla/pyjwt) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/jpadilla/pyjwt/releases)
- [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/jpadilla/pyjwt/compare/2.6.0...2.7.0)

---
updated-dependencies:
- dependency-name: pyjwt[crypto]
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-10 14:02:44 +02:00
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 🎉
v11.0.0
2023-04-29 13:54:02 +02:00
d71e229ad5 Update on_after_login doc 2023-04-29 13:53:49 +02:00
031fa78120 Update docs about transports 2023-04-29 13:53:49 +02:00
8959a12d56 Update verify.py (#1200)
* Update verify.py

When using a schema setup as proposed in the documentation like: ReadUser, CreateUser, UpdateUser and BaseUser in the combination with MongoDB / Beanie, the verify() method will not "enforce" the `user_schema` but instead will return the `BaseUser` which will cause serialisation errors as such:

```
pydantic.error_wrappers.ValidationError: 1 validation error for ReadUser
response -> id
```
because the mapping between MongoDBs internal `_id` and the Pydantic `id` does not work.

* use `from_orm`
2023-04-29 10:21:01 +02:00
867d78f818 docs: add jankadel as a contributor for bug (#1201)
* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-04-27 13:38:19 +02:00