mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2026-03-13 07:49:55 +08:00
Fix #609: make behavior more consistent on request verify token
Now, it always returns 202 even if the user is already verified
This commit is contained in:
@@ -121,9 +121,9 @@ Reset a password. Requires the token generated by the `/forgot-password` route.
|
||||
|
||||
### `POST /request-verify-token`
|
||||
|
||||
Request a user to verify their e-mail. Will generate a temporary token and call the `after_verification_request` [handler](../configuration/routers/verify.md#after-verification-request) if the user exists.
|
||||
Request a user to verify their e-mail. Will generate a temporary token and call the `after_verification_request` [handler](../configuration/routers/verify.md#after-verification-request) if the user **exists**, **active** and **not already verified**.
|
||||
|
||||
To prevent malicious users from guessing existing users in your database, the route will always return a `202 Accepted` response, even if the user requested does not exist.
|
||||
To prevent malicious users from guessing existing users in your database, the route will always return a `202 Accepted` response, even if the user requested does not exist, not active or already verified.
|
||||
|
||||
!!! abstract "Payload"
|
||||
```json
|
||||
|
||||
Reference in New Issue
Block a user