I was trying to create an app where the provider can log in using their epic hyperspace login page and using the access token they can retrieve the patient demography data,
I have created a launch page URL and I’m getting to redirect to the hyperspace page but on the page getting an error.
This is how I launch the epic hypersapce homepage
<code>const clientId = 'a2e8eb27-44a6-49bbd938038411';
const redirectUri
=encodeURIComponent('https://localhost:3000/callback');
const state = '1234';
const scope = 'openid';
const audience =
encodeURIComponent('https://fhir.epic.com/interconnect-fhir-
oauth/api/FHIR/R4');
const authorizeUrl = `https://fhir.epic.com/interconnect-fhir-
oauth/oauth2/authorize?response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}&state=${state}&scope=openid&aud=${audience}`;
</code>
<code>const clientId = 'a2e8eb27-44a6-49bbd938038411';
const redirectUri
=encodeURIComponent('https://localhost:3000/callback');
const state = '1234';
const scope = 'openid';
const audience =
encodeURIComponent('https://fhir.epic.com/interconnect-fhir-
oauth/api/FHIR/R4');
const authorizeUrl = `https://fhir.epic.com/interconnect-fhir-
oauth/oauth2/authorize?response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}&state=${state}&scope=openid&aud=${audience}`;
</code>
const clientId = 'a2e8eb27-44a6-49bbd938038411';
const redirectUri
=encodeURIComponent('https://localhost:3000/callback');
const state = '1234';
const scope = 'openid';
const audience =
encodeURIComponent('https://fhir.epic.com/interconnect-fhir-
oauth/api/FHIR/R4');
const authorizeUrl = `https://fhir.epic.com/interconnect-fhir-
oauth/oauth2/authorize?response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}&state=${state}&scope=openid&aud=${audience}`;
1