mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2026-03-13 07:49:55 +08:00
@@ -31,6 +31,12 @@ Register a new user. Will call the `on_after_register` [event handlers](../confi
|
||||
!!! fail "`400 Bad Request`"
|
||||
A user already exists with this email.
|
||||
|
||||
```json
|
||||
{
|
||||
"detail": "REGISTER_USER_ALREADY_EXISTS"
|
||||
}
|
||||
```
|
||||
|
||||
### `POST /login`
|
||||
|
||||
Login a user.
|
||||
@@ -52,6 +58,12 @@ Login a user.
|
||||
!!! fail "`400 Bad Request`"
|
||||
Bad credentials or the user is inactive.
|
||||
|
||||
```json
|
||||
{
|
||||
"detail": "LOGIN_BAD_CREDENTIALS"
|
||||
}
|
||||
```
|
||||
|
||||
### `POST /forgot-password`
|
||||
|
||||
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.
|
||||
@@ -86,6 +98,12 @@ Reset a password. Requires the token generated by the `/forgot-password` route.
|
||||
!!! fail "`400 Bad Request`"
|
||||
Bad or expired token.
|
||||
|
||||
```json
|
||||
{
|
||||
"detail": "RESET_PASSWORD_BAD_TOKEN"
|
||||
}
|
||||
```
|
||||
|
||||
## Authenticated
|
||||
|
||||
### `GET /me`
|
||||
|
||||
Reference in New Issue
Block a user