130 Commits

Author SHA1 Message Date
7ac5dc8486 Bump version: 5.0.0 → 5.1.0 2021-02-07 09:59:44 +01:00
48d9a399e0 Fix type errors 2021-02-07 09:58:52 +01:00
4b5a79ae08 Update depreciation flag for dep callables 2021-02-07 09:45:03 +01:00
579313f887 Ormar backend support (#470)
* Add db adapter for ormar (wip)

* finish ormar support enough to pass tests

* remove idea folder

* update ormar version in tool.flit.metadata.requires-extra

* Add documentation about ormar

* Apply isort and black formatting

* Restore python 3.7 in Pipfile

* Update build.yml

* Add missing test for ormar update

* changes after review

Co-authored-by: Paolo Dina <paolo.dina@codingmoth.com>
Co-authored-by: collerek <collerek@gmail.com>
2021-02-07 09:34:40 +01:00
4776117f10 Write the docs for new current_user dependency 2021-02-06 13:55:41 +01:00
3146a1ffe6 Fix #475: add uuid convertor to routes so they are not catching custom routes 2021-02-06 11:16:15 +01:00
968bc16585 Add depreciation warning to predefined authenticator deps 2021-01-13 18:53:38 +01:00
58b8d28c76 Improve Authenticator class to generate dependency variations more easily 2021-01-13 18:07:25 +01:00
9f69b4762a Bump version: 4.0.0 → 5.0.0 2021-01-12 11:25:10 +01:00
1df6e7d162 Fix get_verify_router docstring 2021-01-12 11:21:23 +01:00
d4227ae20f Fix #335: implement after_reset_password handler 2021-01-12 11:18:34 +01:00
2829824a95 Fix #438: issue while retrieving OAuth accounts with PSQL 2021-01-12 10:53:40 +01:00
373157c284 Finalize user activation feature (#439)
* Add routes for user activation (#403)

* Add routes for user activation

Generate a token after creating the user in register route, passing to `activation_callback`, if `activation_callback` supplied
Create new `/activate` route that will verify the token and activate the user
Add new error codes to `fastapi_users/router/common.py`
Update documentation
Add tests

Co-authored-by: Mark Todd <markpeter.todd@hotmail.co.uk>

* Rework routes for user activation

* Separate verification logic and token generation into `/fastapi_users/router/verify.py`, with per-route callbacks for custom behaviour

* Return register router to original state

* Added `is_verified` property to user models

* Added `requires_verification` argument to `get_users_router`and `get_auth_router`

* Additional dependencies added for verification in `fastapi_users/authentication/__init__.py`

* Update tests for new behaviour

* Update `README.md` to describe a workaround for possible problems during testing, by exceeding ulimit file descriptor limit

Co-authored-by: Mark Todd <markpeter.todd@hotmail.co.uk>

* Restored docs to original state.

* All other modifications reqested added

Kebab-case on request-verify-token
SECRET now used as test string
Other minor changes

Co-authored-by: Mark Todd <markpeter.todd@hotmail.co.uk>

* Embed token in body in verify route

* Reorganize checks in verify route and add unit test

* Ignore coverage on Protocol classes

* Tweak verify_user function to take full user in parameter

* Improve unit tests structure regarding parametrized test client

* Make after_verification_request optional to be more consistent with other routers

* Tweak status codes on verify routes

* Write documentation for verification feature

* Add not released warning on verify docs

Co-authored-by: Edd Salkield <edd@salkield.uk>
Co-authored-by: Mark Todd <markpeter.todd@hotmail.co.uk>
2021-01-12 10:44:42 +01:00
7f6e3c9253 Bump version: 3.1.2 → 4.0.0 2020-12-28 09:12:47 +01:00
7cf7154e27 Fix #431: make OAuth expires_at optional in model and DB schemas 2020-12-28 08:59:27 +01:00
92c523c379 Upgrade to pyjwt==2.0.0 2020-12-24 09:47:34 +01:00
7e2ca9551e Bump version: 3.1.1 → 3.1.2 2020-12-23 17:35:30 +01:00
7186554e30 Bump version: 3.1.0 → 3.1.1 2020-11-30 14:12:00 +01:00
31168ce9d3 Fix #401: missing typing-extensions dependency 2020-11-30 13:44:19 +01:00
8e82b1e172 Use Protocol from typing if available (#402)
Some of the 'experimental' definitions in typing_extensions are added to the typing module in time.

This PR prefers the stdlib imports when available, falling back to typing_extensions as necessary
2020-11-30 13:09:35 +01:00
253e7e0e80 Bump version: 3.0.7 → 3.1.0 2020-11-22 10:11:09 +01:00
435f29331a Fix #391: put user creation logic in a importable function 2020-11-22 09:57:03 +01:00
60c618a8a3 Bump version: 3.0.6 → 3.0.7 2020-11-17 08:38:34 +01:00
7d5e6faffb Bump version: 3.0.5 → 3.0.6 2020-10-14 14:16:36 +02:00
97cc799737 Add SQL String length in SQLAlchemy for MySQL compatibility 2020-09-30 14:48:51 +02:00
8adce74cd9 added samesite option for cookie authentication (#337)
* added samesite option for cookie authentication

* formatted with black and added documentation (grabbed from starlette.io documentation)
2020-09-30 07:27:25 +02:00
531fdeed2d Bump version: 3.0.4 → 3.0.5 2020-08-26 15:51:42 +02:00
9e499791de Bump version: 3.0.3 → 3.0.4 2020-08-13 14:03:40 +02:00
657df06e53 Bump version: 3.0.2 → 3.0.3 2020-07-21 15:26:13 +02:00
28f4eed5e5 Bump version: 3.0.1 → 3.0.2 2020-07-20 16:35:26 +02:00
6334a4b911 Fix #261: improve email query in MongoDB 2020-07-20 16:18:53 +02:00
1b6c832b28 Bump version: 3.0.0 → 3.0.1 2020-07-13 14:20:50 +02:00
0134a43fad Bump version: 2.0.1 → 3.0.0 2020-07-09 18:44:50 +02:00
b7dbdf6ea6 Fix #245 : handle email as case insensitive while retrieving user in DB (#250)
* Add unit tests to enforce email case insensitivity

* Handle email as case insentitive while retrieving user in DB

* Apply isort/black

* Add migration doc
2020-07-09 18:44:25 +02:00
e63a67ead3 Bump packages and apply black 2020-07-09 17:28:41 +02:00
1b24d307a8 Bump version: 2.0.0 → 2.0.1 2020-06-27 17:23:13 +02:00
efad0e0fef fix "Swagger issue for endpoints register & update" (#233)
* fix: Change on the inheritance model, according to the documentation for the request body parameters. #171

* fix: Changes on the documentation examples to fix the inheritance problem when passing the User class (for create or update only passing the pydantic one) #171

* fix: Changes on the documentation examples to fix the inheritance problem when passing the User class (for create or update only passing the pydantic one) #171

* Put back inheritance on update model and factorize create_update_dict methods

Co-authored-by: François Voron <fvoron@gmail.com>
2020-06-27 17:19:53 +02:00
111af6e2eb Bump version: 1.1.1 → 2.0.0 2020-06-15 14:35:30 +02:00
75147a7071 fix documentation tokenUrl (#210)
* fix documentation tokenUrl

* Change default login tokenUrl
2020-06-15 14:33:52 +02:00
224a311792 fix "Authorization: Bearer Undefined" on Swagger (#213)
* fix "Authorization: Bearer Undefined" on Swagger

* updating pytest to recognize access_token

* fix pytest KeyError

* adding changes requested (add token_type to documentation and tests)

* fix documentation
2020-06-15 14:04:03 +02:00
6ff5adfdf2 Fix import error when OAuth is not installed 2020-06-02 07:57:42 +02:00
3fab5e5bbb Bump version: 1.1.0 → 1.1.1 2020-05-26 16:36:58 +02:00
1c20b4c58a Bump version: 1.0.0 → 1.1.0 2020-05-25 08:13:50 +02:00
9508768502 Add get_optional_* dependency callables 2020-05-25 08:13:42 +02:00
71ca7d85ed Remove default router on FastAPIUsers 2020-05-24 10:50:14 +02:00
ee8908e066 Bump version: 0.8.1 → 1.0.0 2020-05-24 10:29:56 +02:00
7721f8dcc1 Revamp authentication routes structure (#201)
* Fix #68: use makefun to generate dynamic dependencies

* Remove every Starlette imports

* Split every routers and remove event handlers

* Make users router optional

* Pass after_update handler to get_users_router

* Update documentation

* Remove test file

* Write migration doc for splitted routers
2020-05-24 10:18:01 +02:00
0a0dcadfdc Use real UUID for User id. and OAuthAccount id. (#198)
* Use UUID for user id and oauth account id

* Update documentation for UUID

* Tweak GUID definition of SQLAlchemy to match Tortoise ORM one

* Write migration doc
2020-05-21 16:40:33 +02:00
d814b48280 Bump version: 0.8.0 → 0.8.1 2020-05-19 08:02:20 +02:00
6292c15d77 Bump version: 0.7.3 → 0.8.0 2020-04-25 14:36:07 +02:00