-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update README to correct code snippets and add resend OTP endpo…
…int (#1895) ## What kind of change does this PR introduce? docs: update README to correct code snippets and add resend OTP endpoint. fix #1711
- Loading branch information
Showing
1 changed file
with
32 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -820,7 +820,7 @@ Returns | |
|
||
Register a new user with an email and password. | ||
|
||
```js | ||
```json | ||
{ | ||
"email": "[email protected]", | ||
"password": "secret" | ||
|
@@ -866,13 +866,39 @@ Returns: | |
|
||
if AUTOCONFIRM is enabled and the sign up is a duplicate, then the endpoint will return: | ||
|
||
``` | ||
```json | ||
{ | ||
"code":400, | ||
"msg":"User already registered" | ||
} | ||
``` | ||
|
||
### **POST /resend** | ||
|
||
Allows a user to resend an existing signup, sms, email_change or phone_change OTP. | ||
|
||
```json | ||
{ | ||
"email": "[email protected]", | ||
"type": "signup" | ||
} | ||
``` | ||
|
||
```json | ||
{ | ||
"phone": "12345678", | ||
"type": "sms" | ||
} | ||
``` | ||
|
||
returns: | ||
|
||
```json | ||
{ | ||
"message_id": "msgid123456" | ||
} | ||
``` | ||
|
||
### **POST /invite** | ||
|
||
Invites a new user with an email. | ||
|
@@ -985,14 +1011,16 @@ One-Time-Password. Will deliver a magiclink or sms otp to the user depending on | |
|
||
If `"create_user": true`, user will not be automatically signed up if the user doesn't exist. | ||
|
||
```js | ||
```json | ||
{ | ||
"phone": "12345678" // follows the E.164 format | ||
"create_user": true | ||
} | ||
``` | ||
|
||
OR | ||
|
||
```json | ||
// exactly the same as /magiclink | ||
{ | ||
"email": "[email protected]" | ||
|
@@ -1002,7 +1030,7 @@ OR | |
|
||
Returns: | ||
|
||
``` | ||
```json | ||
{} | ||
``` | ||
|
||
|