Reset
/api/v2/user/reset
Post
users
Purpose
To allow a registered user to reset his / her password.
Body Content [input]
{
auth_data: string
}
Returns if valid [output]
{
message: string,
error: 0
}
What the API does
- Checks if there is a record in the
users
collection with the value of theauth_data
field supplied [404]. - Checks if the record from the
users
collection has an activated account using theactive
field [401]. - Checks if the value of the
reset
bool
of the found user is not alreadytrue
[400]. - Sends a mail to the email address corresponding to the value of the
prev_email
field with the following link:https://api.konnect.dev/api/v2/user/password/reset/${username}/${token}
- Sets the value of the
reset
bool
totrue
and that of theemail
field to that of theprev_email
and saves the record.