oscadev
07/09/2025, 7:15 PMnathan-watkins-unityai
07/09/2025, 7:25 PMProjectMembership.id in your database. Subsequent requests to medplum are proxied through your application server, where auth is validated, then sent to medplum via a ClientApplication with the [On-Behalf-Of](https://www.medplum.com/docs/auth/methods/on-behalf-of#:~:text=The%20Medplum%20API%20supports%20an,that%20interacts%20with%20Medplum%20Server.) header of the project membership id. In your react components, the MedplumClient base url is the backend route that proxies to medplum.rahul1
07/09/2025, 9:29 PMoscadev
07/09/2025, 10:04 PMoscadev
07/09/2025, 10:30 PMnathan-watkins-unityai
07/09/2025, 11:15 PM/api/medplum that [proxies](https://www.npmjs.com/package/http-proxy-middleware) to medplum after validating auth how you normally would. After authenticating through your existing auth mechanism, attach the x-on-behalf-of header and client application's Authorization token. Your medplum client baseUrl would be your own api https://your-existing-api.com/api/medplumDoug DeBold
07/14/2025, 3:18 PMnathan-watkins-unityai
07/14/2025, 8:27 PMOn-behalf-of works well for this.