-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d55942
commit 4c7867d
Showing
20 changed files
with
144 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,21 +14,22 @@ POST https://your-domain.com/password-reset-requests | |
|
||
## Request body | ||
|
||
All fields are required. | ||
|
||
```ts | ||
{ | ||
"email": string | ||
"email": string, | ||
"client_ip": string | ||
} | ||
``` | ||
|
||
- `email` | ||
- `email` (required): A valid email address. | ||
- `client_ip`: The client's IP address. If included, it will rate limit the endpoint based on it. | ||
|
||
### Example | ||
|
||
```json | ||
{ | ||
"email": "[email protected]" | ||
"email": "[email protected]", | ||
"client_ip": "0.0.0.0" | ||
} | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,24 +14,25 @@ POST https://your-domain.com/users | |
|
||
## Request body | ||
|
||
All fields are required. | ||
|
||
```ts | ||
{ | ||
"email": string, | ||
"password": string | ||
"password": string, | ||
"client_ip": string | ||
} | ||
``` | ||
|
||
- `email`: A valid email address. | ||
- `password`: A valid password. Password strength is determined by checking it aginst past data leaks using the [HaveIBeenPwned API](https://haveibeenpwned.com/API/v3#PwnedPasswords). | ||
- `email` (required): A valid email address. | ||
- `password` (required): A valid password. Password strength is determined by checking it aginst past data leaks using the [HaveIBeenPwned API](https://haveibeenpwned.com/API/v3#PwnedPasswords). | ||
- `client_ip`: The client's IP address. If included, it will rate limit the endpoint based on it. | ||
|
||
### Example | ||
|
||
```json | ||
{ | ||
"email": "[email protected]", | ||
"password": "48n2r3tnaqp" | ||
"password": "48n2r3tnaqp", | ||
"client_ip": "0.0.0.0" | ||
} | ||
``` | ||
|
||
|
46 changes: 0 additions & 46 deletions
46
docs/pages/api-reference/rest/endpoints/post_users_userid_password.md
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
docs/pages/api-reference/rest/endpoints/post_users_userid_update-password.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
title: "POST /users/[user_id]/update-password" | ||
--- | ||
|
||
# POST /users/[user_id]/update-password | ||
|
||
Updates a user's password. | ||
|
||
``` | ||
POST https://your-domain.com/users/USER_ID/update-password | ||
``` | ||
|
||
## Request body | ||
|
||
```ts | ||
{ | ||
"password": string, | ||
"new_password": string, | ||
"client_ip": string | ||
} | ||
``` | ||
|
||
- `password` (required): The current password. | ||
- `new_password` (required): A valid password. Password strength is determined by checking it aginst past data leaks using the [HaveIBeenPwned API](https://haveibeenpwned.com/API/v3#PwnedPasswords). | ||
- `client_ip`: The client's IP address. If included, it will rate limit the endpoint based on it. | ||
|
||
### Example | ||
|
||
```json | ||
{ | ||
"password": "48n2r3tnaqp", | ||
"new_password": "a83ri1lw2aw", | ||
"client_ip": "0.0.0.0" | ||
} | ||
``` | ||
|
||
## Successful response | ||
|
||
No response body (204). | ||
|
||
## Error codes | ||
|
||
- [400] `INVALID_DATA`: Invalid request data. | ||
- [400] `WEAK_PASSWORD`: The password is too weak. | ||
- [400] `TOO_MANY_REQUESTS`: Exceeded rate limit. | ||
- [404] `NOT_FOUND`: The user does not exist. | ||
- [500] `UNKNOWN_ERROR` |
Oops, something went wrong.