Hello,
I am currently working on this demo: medplum/medplum-smart-on-fhir-demo
And I’m running into the error: “State parameter mismatch - possible security issue” from LaunchPage.tsx when I try to perform an EHR launch.
I‘m hosting some sample FHIR data on the MedPlum website, and I would like to perform a EHR launch to view this data in that demo app from MedPlum on localhost. I’ve got my redirect and launch URL set to localhost:8001/launch in the MedPlum ClientApplication settings page, and I’ve set the client ID and auth URL in config.ts as per the README.
This error happens because the stored state variable is null, so it doesn’t match the incoming state. I believe this is because the button is sending the wrong request, I think the request should contain a launch and iss parameter that would set the state variable in session storage and then redirect.
Has anyone else run this demo? Am I missing something or is there a bug in the demo? Would appreciate any and all help.
Regards,
Duncan