mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2026-03-13 07:49:55 +08:00
Bump dependencies
This commit is contained in:
@@ -8,7 +8,7 @@ You can have **several** authentication methods, e.g. a cookie authentication fo
|
||||
|
||||
When checking authentication, each method is run one after the other. The first method yielding a user wins. If no method yields a user, an `HTTPException` is raised.
|
||||
|
||||
For each backend, you'll be able to add a router with the corresponding `/login` and `/logout` (if applicable routes). More on this in the [routers documentation](routers/index.md).
|
||||
For each backend, you'll be able to add a router with the corresponding `/login` and `/logout` (if applicable routes). More on this in the [routers documentation](../routers/index.md).
|
||||
|
||||
## Provided methods
|
||||
|
||||
|
||||
@@ -3,18 +3,24 @@
|
||||
Here is a full working example with JWT authentication to help get you started.
|
||||
|
||||
!!! warning
|
||||
Notice that **SECRET** should be changed to a strong passphrase.
|
||||
Notice that **SECRET** should be changed to a strong passphrase.
|
||||
Insecure passwords may give attackers full access to your database.
|
||||
|
||||
``` py tab="SQLAlchemy"
|
||||
## SQLAlchemy
|
||||
|
||||
```py
|
||||
{!./src/full_sqlalchemy.py!}
|
||||
```
|
||||
|
||||
```py tab="MongoDB"
|
||||
## MongoDB
|
||||
|
||||
```py
|
||||
{!./src/full_mongodb.py!}
|
||||
```
|
||||
|
||||
```py tab="Tortoise ORM"
|
||||
## Tortoise ORM
|
||||
|
||||
```py
|
||||
{!./src/full_tortoise.py!}
|
||||
```
|
||||
|
||||
|
||||
@@ -166,14 +166,20 @@ app.include_router(google_oauth_router, prefix="/auth/google", tags=["auth"])
|
||||
Notice that **SECRET** should be changed to a strong passphrase.
|
||||
Insecure passwords may give attackers full access to your database.
|
||||
|
||||
``` py tab="SQLAlchemy"
|
||||
#### SQLAlchemy
|
||||
|
||||
``` py
|
||||
{!./src/oauth_full_sqlalchemy.py!}
|
||||
```
|
||||
|
||||
```py tab="MongoDB"
|
||||
#### MongoDB
|
||||
|
||||
```py
|
||||
{!./src/oauth_full_mongodb.py!}
|
||||
```
|
||||
|
||||
```py tab="Tortoise ORM"
|
||||
#### Tortoise ORM
|
||||
|
||||
```py
|
||||
{!./src/oauth_full_tortoise.py!}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user