Forget Password


POST
Get Verification Code
user id is required in url
URL : axios.post('https://domain.com/auth/forgetpass/', body)
BODY

{
  "email" : "admin@gmail.com"
}

Response
Looks like this

{
    code   : 200,
    message: 'Verification code sent successfully',
}
Don't forget to make another status code response
POST
Code Validation
user id is required in url
URL : axios.post('https://domain.com/auth/lupa-password/verifikasi/'+header token', body)
get from api web
BODY

{
    kode: '12345'
}

Response
The result is

{
    code: 200,
    message: 'Verification successful'
}
Request
Update New Password
user id is required in url
URL : axios.post('https://domain.com/dev/passupdate/'+USERID+'/', body)
BODY

{
    "newPassword" : "123321",
    "repeatPassword" : "123321"
}
Response
Result Success
IF SUCCESS

          {
              "code": 200,
              "id": "USRL6HvSBCn9VZ",
              "password": "$2b$10$k/yxVj9Y0XlzNPio8pxH/OwffBeKi406cFW8npKsPrn6LYhhMPtwW"
          }
          
ATTENTION Checking NEW PASSWORD and PASSWORD CONFIRM working on Front End App
Response
Result
IF OLD Password Not Same

          {
              "message": "Password does not match"
          }
          
Don't forget to make another status code response

CODE :
  • 200
  • 201
  • 500
  • 404
  • 405