Forgot Password!!!
# support
p
I need to add forgot password feature , do we have any service or api that gives this feature. Can u share the link for the documentation, i am not being able to find it
r
Apologies for the lack of documentation. The endpoint for reseting the password is
auth/resetpassword
. You can find example usage here: https://github.com/medplum/medplum/blob/5399b64935bbc6a86e4462d51fe861319117dfbe/packages/app/src/ResetPasswordPage.tsx#L33-L47
d
@rahul1 Hello! I'm continuing to have trouble with password reset. Should this endpoint work for a
clientApplication
? When I try to implement password reset with my own app, I get a
Recaptcha failed
error. I do have the recaptcha keys entered in Sites under the Project tab. It seems like the
auth/resetpassword
endpoint only works for resetting passwords on app.medplum.com, as I assume the server is requiring the recaptcha for app.medplum.com, and not my own app. Thanks for your help clarifying this.
p
From the documentation i found out , we need some type of recaptch_site_key.. Where do we find one or how will we create one?
also i am getting 500 internal server error on auth/resetpassword
@rahul1
r
Yup, you will need to create a Recaptcha Site Key and Recaptcha Secret Key and put them in your Project Settings (here's the instructions from Foomedical sample app https://github.com/medplum/medplum/tree/main/examples/foomedical#account-setup). Here is the google documentation https://cloud.google.com/recaptcha-enterprise/docs/create-key#web-keys
p
is it compulsary to send recaptcha sitekey and secret while resetting the password. Cause i am getting 500 error response from auth/reset passwrod api
And one question after we get the success response from /auth/resetpassword it should send email right ?
for your information i have attached the response.. I am confused how will i be able to find my password now...
r
Prashant - I'm not sure what environment you are in but possible that your email setup is not active. We have added this documentation to help in your setup - is it helpful? https://www.medplum.com/docs/auth/custom-emails#password-change-request-bot
p
ok i will look into it , Thanks!
Thanks for the help. everthing is working fine now .
n
Hello, The Forgot password document you provided is not working with my case I want forgot password on Foo-Medical. Where patient can submi request for reset password and they will get link of Foo-Medical site to reset password Any way to implement this?
r
Apologies this isn't working on Foomedical - here is the documentation on how to implement this https://www.medplum.com/docs/auth/custom-emails#reset-password-page -
163 Views