How to implement Forgot password using POST REST API in Ionic 4?

747 Views Asked by At

Ionic 4: How to implement Forgot password functionality using the POST method: REST API?

I've already checked the user with REST API and it's validated but I'm not sure how to send the validated user's email and new the password with 2 fields like new password & update password.

NOTE: If my question isn't clear kindly suggest me forgot password API

This is the API to update the password: Method: POST

URL: https://www.abcd.com/updatePassword

Request:

{"email": "[email protected]", "userId":"1234567890", "password":"test", "confirmPassword":"test" }

Failure:

{"code":"401","data":{}}

{"code":"401","data":{},"message":"Password and Confirm Password Not Matching"}

Success:

{"code":"200","data":{"status":"success"},"message":"Updated Successfully!"} 
1

There are 1 best solutions below

0
On

if user will forget password then user only know it's mail id so then you can send reset password link or old password via e-mail.