mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2026-03-13 07:49:55 +08:00
Fix documentation internal links
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
## Next steps
|
||||
|
||||
We will now configure the main **FastAPI Users** object that will expose the [API router](/configuration/router).
|
||||
@@ -1,3 +0,0 @@
|
||||
## Next steps
|
||||
|
||||
We will now configure an [authentication method](/configuration/authentication).
|
||||
@@ -22,4 +22,6 @@ This method expects that you provide a `Bearer` authentication with a valid JWT.
|
||||
curl http://localhost:9000/protected-route -H'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiOTIyMWZmYzktNjQwZi00MzcyLTg2ZDMtY2U2NDJjYmE1NjAzIiwiYXVkIjoiZmFzdGFwaS11c2VyczphdXRoIiwiZXhwIjoxNTcxNTA0MTkzfQ.M10bjOe45I5Ncu_uXvOmVV8QxnL-nZfcH96U90JaocI'
|
||||
```
|
||||
|
||||
{!./configuration/_next_router.md!}
|
||||
## Next steps
|
||||
|
||||
We will now configure the main **FastAPI Users** object that will expose the [API router](../router.md).
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
|
||||
**Coming soon**. Track the progress of this feature in [ticket #4](https://github.com/frankie567/fastapi-users/issues/4).
|
||||
|
||||
{!./configuration/authentication/_next_authentication.md!}
|
||||
## Next steps
|
||||
|
||||
We will now configure an [authentication method](../authentication/index.md).
|
||||
|
||||
@@ -25,7 +25,7 @@ For the sake of this tutorial from now on, we'll use a simple SQLite databse.
|
||||
Let's create a `metadata` object and declare our User table.
|
||||
|
||||
```py hl_lines="4 14 15"
|
||||
{!./src/sqlalchemy.py!}
|
||||
{!./src/db_sqlalchemy.py!}
|
||||
```
|
||||
|
||||
As you can see, **FastAPI Users** provides a mixin that will include base fields for our User table. You can of course add you own fields there to fit to your needs!
|
||||
@@ -35,7 +35,7 @@ As you can see, **FastAPI Users** provides a mixin that will include base fields
|
||||
We'll now create an SQLAlchemy enigne and ask it to create all the defined tables.
|
||||
|
||||
```py hl_lines="18 19 20 21 22"
|
||||
{!./src/sqlalchemy.py!}
|
||||
{!./src/db_sqlalchemy.py!}
|
||||
```
|
||||
|
||||
!!!tip
|
||||
@@ -51,7 +51,9 @@ The database adapter of **FastAPI Users** makes the link between your database c
|
||||
|
||||
Notice that we declare the `users` variable, which is the actual SQLAlchemy table behind the table class. We also use our `database` instance, which allows us to do asynchronous request to the database.
|
||||
|
||||
{!./configuration/authentication/_next_authentication.md!}
|
||||
## Next steps
|
||||
|
||||
We will now configure an [authentication method](../authentication/index.md).
|
||||
|
||||
## What about SQLAlchemy ORM?
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ You'll find here the routes exposed by **FastAPI Users**. Note that you can also
|
||||
|
||||
### `POST /register`
|
||||
|
||||
Register a new user.
|
||||
Register a new user. Will call the `on_after_register` [event handlers](../configuration/router.md#event-handlers) on successful registration.
|
||||
|
||||
!!! abstract "Payload"
|
||||
```json
|
||||
@@ -54,7 +54,7 @@ Login a user.
|
||||
|
||||
### `POST /forgot-password`
|
||||
|
||||
Request a reset password procedure. Will generate a temporary token and call the defined `on_after_forgot_password` if the user exists.
|
||||
Request a reset password procedure. Will generate a temporary token and call the `on_after_forgot_password` [event handlers](../configuration/router.md#event-handlers) if the user exists.
|
||||
|
||||
To prevent malicious users from guessing existing users in your databse, the route will always return a `202 Accepted` response, even if the user requested does not exist.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user