alex_empallo
12/23/2024, 5:42 PMAccessPolicy resources are great for restricting by IP, but in this case, I need to enforce restrictions based on the domain (e.g., blocking patients from accessing the provider portal’s domain). What is the best way to set this up?
Thank you!rahul1
12/29/2024, 9:52 PMrahul1
12/29/2024, 9:58 PMrahul1
12/29/2024, 10:05 PMMedplumClient , you can specify the type of "profile" (Patient, Practitioner, RelatedPerson) that is logging in.
Our auth methods all take the BaseLoginRequest object as a param. The resourceType param there specifies what profileType is used
https://github.com/medplum/medplum/blob/38fe93bd9e5d2957d3b494454e050f6cca5c7e3d/packages/core/src/client.ts#L385
You can see an example of how this is used in our AuthenticationForm React component
https://github.com/medplum/medplum/blob/f9dc331bef9099ae9d62b43034d81f6285a5b608/packages/react/src/auth/AuthenticationForm.tsxalex_empallo
01/15/2025, 4:17 PM