Set a new password using a password reset token
curl --request POST \
--url https://api.acornops.dev/api/v1/auth/password/reset \
--header 'Content-Type: application/json' \
--header 'x-csrf-token: <x-csrf-token>' \
--data '
{
"token": "base64url-reset-token",
"password": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-csrf-token': '<x-csrf-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({token: 'base64url-reset-token', password: '<string>'})
};
fetch('https://api.acornops.dev/api/v1/auth/password/reset', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true,
"status": "<string>",
"message": "<string>",
"resendAfterSeconds": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Auth and users
Set a new password using a password reset token
Reset tokens are bearer secrets. Successful reset verifies the account email, consumes outstanding reset and verification tokens for the same user/email, and revokes browser sessions.
Set a new password using a password reset token
curl --request POST \
--url https://api.acornops.dev/api/v1/auth/password/reset \
--header 'Content-Type: application/json' \
--header 'x-csrf-token: <x-csrf-token>' \
--data '
{
"token": "base64url-reset-token",
"password": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-csrf-token': '<x-csrf-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({token: 'base64url-reset-token', password: '<string>'})
};
fetch('https://api.acornops.dev/api/v1/auth/password/reset', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ok": true,
"status": "<string>",
"message": "<string>",
"resendAfterSeconds": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"details": {}
}
}Headers
CSRF token returned by /api/v1/auth/csrf and mirrored in the CSRF cookie.
Body
application/json