Hi Wonderful Medplum Folks - We have been making some progress with using Medplum and had some questions about this SDK method
https://www.medplum.com/docs/sdk/core.medplumclient.startlogin.
1. We are using this method with Practitioners & login process works fine. However, when we are using this method with Patients, it gives an error. Just trying to understand if this method is designed just for Practitioners or for Patients as well.
2. We are calling startLogin as below & it works. You will note that there is no client id or project id. Does this mean that email addresses are globally unique? How does Medplum know about the project to which the user belongs? Thanks for the help.
const loginRequest: EmailPasswordLoginRequest = {
email,
password,
};
const loginResponse = await medplum.startLogin(loginRequest);
const loginToken = await medplum.processCode(loginResponse.code as string);