Bug: Forgot Password is not project specific
# support
n
Hello, I'm experiencing an issue with two Foo-Medical websites connected to two Self-hosted Medplum projects. Specifically, when attempting to reset the password on Site1, I receive the reset password request from Site2. I have two users with the same email address on Site1 and Site2. Upon deep diving into the Medplum server code for debugging, I noticed no condition to search for a patient based on the project. Could you please provide a solution for this issue? I have attached the screenshot for the reset-password API code. The URL to the specific file in the Medplum Reset Password API GitHub repository is https://github.com/medplum/medplum/blob/main/packages/server/src/auth/resetpassword.ts.
r
@nikulkhatik - are you following this guide for creating custom Password Change Bots per project? https://www.medplum.com/docs/auth/custom-emails#password-change-request-bot
r
@rahul1 Yes, We did.
r
thanks @ravindratc , and thank you for doing a deep dive on the code. I believe you have discovered a bug - we're very sorry for the inconvenience 😦
I've made some comments to your ticket here, and we will add to our roadmap: https://github.com/medplum/medplum/issues/3340
r
Thanks
@rahul1 I've created a PR for this issue. Please take a look at it. https://github.com/medplum/medplum/pull/3351
r
Thank you for the contribution @ravindratc ! We'll take a look
r
@rahul1 Could you please take a look at this https://discord.com/channels/905144809105260605/1169286940999294986
r
@ravindratc , thank you so much for the contribution. I've made a few comments on your PR that need to be changed before merging, but this is looking good in genearl
r
Hi @rahul1 , I've resolve the comment and fixed the broken test case and additionally created two more test cases for new scenario.
r
Thank you so much for the contribution@ravindratc ! We have just merged, and it should be deployed within a few hours https://github.com/medplum/medplum/pull/3351
r
@rahul1 Thanks l