23 Commits

Author SHA1 Message Date
e17bb609ae Add compatibility layer for Pydantic V2 2023-07-12 10:44:22 +02:00
9b57fa2e73 Allow to set is_verified to True after OAuth callback 2023-02-13 17:42:31 +01:00
5c48283155 Update docs for SQLAlchemy 2.0 2023-02-13 17:28:49 +01:00
b18389439a Use "sub" claim instead of "user_id" for JWT, verify and reset password tokens 2023-01-16 11:44:42 +01:00
794133c4fe Ensure reset password token is single use 2023-01-16 11:38:49 +01:00
ce15284fe9 Implement a router to associate an OAuth account with an authenticated user 2022-06-20 14:44:25 +02:00
64d3996415 Add flag to enable/disable email association with OAuth 2022-06-20 13:46:47 +02:00
3bb3728261 add on delete hook (#1014)
Co-authored-by: Schwannden Kuo <schwannden@mobagel.com>
2022-06-20 13:26:02 +02:00
78be936297 Put exceptions in a dedicated module to avoid circular imports 2022-05-06 13:17:22 +02:00
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
7f6d038d91 Create a class helper to let configure the password hasher dynamically 2022-03-22 14:16:49 +01:00
ab06778adf Fix #733: don't raise error when updating user with same email 2021-09-20 08:49:19 +02:00
de86456af2 Add some manager tests 2021-09-15 15:20:28 +02:00
4aac218d8a Add manager pytest marker 2021-09-15 14:49:49 +02:00
5cba969679 Refactor verify logic into manager 2021-09-15 14:36:04 +02:00
1aea32ca4a Tweak unit test 2021-09-15 13:35:28 +02:00
3bdae94869 Refactor OAuth logic into manager 2021-09-15 11:57:17 +02:00
9673e0a5fd Move on_after_update to manager 2021-09-15 09:34:28 +02:00
663b7405a7 Move forgot/reset password logic to manager 2021-09-15 09:13:11 +02:00
38d4aed817 Move on_after_register to manager 2021-09-14 15:02:17 +02:00
8967138375 Inject a user manager dep callable directly to FastAPIUsers 2021-09-14 14:39:59 +02:00
480a6bc4df Move validate_password into UserManager 2021-09-14 14:01:57 +02:00
dade8c263d Revamp implementation with a manager layer and db class as dependency callable 2021-09-14 11:12:34 +02:00