Hi ,
I am working on my app in which , after I submit the request for Forgot password , user will receive the email with an URL1 = (https://api.mydomain.com/dist/#/reset-password) and Reset Password Code.
I am planning to use my own reset password page with URL2 = www.myapp.com/reset, where the user will submit this Reset Password Code , New Password and Confirm Password and my app will submit this code to URL1 automatically.
Can anyone help me with this ? Do we have a curl command to follow the above mentioned steps ??
Hi,
the first step will be to post the email to this API endpoint:
/user/password?reset=true
curl -X âPOSTâ âhttps:/api.mydomain.com/api/v2/user/password?reset=trueâ
-H âContent-Type: application/json; charset=utf-8â
-d $â{
âemailâ: "your@email.com"
}â
In case the server answers with a statusCode 200 you will receive an email with a âReset Password Codeâ. Make sure you have set up the email template in your Dreamfactory instance under Config->Email Templates.
In the second step you have to provide a webpage which receives the parameters (and extract them from the url) from the email (password code, email). This webpage should contain a form which pre-fills the reset code and email address along with an empty password field.
Then you submit the content of the form again to âhttps:/api.mydomain.com/api/v2/user/passwordâ.
cCurl:
Request
curl -X âPOSTâ âhttps://api.mydomain.com//api/v2/user/passwordâ
-H âContent-Type: application/json; charset=utf-8â
-d $â{
âemailâ: "your@email.com",
âcodeâ: â578JRGJJ2X2IX3LG08WMAKITM5XMKXRPâ,
ânew_passwordâ: âMyNewPasswordâ
}â
Hope this helps to get your app running!
Regards
Thomas
1 Like