Is there anyway to get a more detailed error message? I'm working with the original poster above and we can't get any other response besides the "Something went wrong trying to authorize the client. Please try logging in again." error page.
I've tried in the simulator using the same straight foward SMART on FHIR client-js code that works with Cerner OAuth.
const options: any = {
'scope': 'launch online_access patient/Patient.read',
'response_type': 'code',
'client_id': ff9bda66-1111-2222-3333-123456789012,
'launch': 'eyJhbGciO...V_A', // using the launch token included in the URL
'state': 'dev-abc-123',
'completeInTarget': true // prevents warning in simulator
}
this.fhir.oauth2.authorize(options);
The simulator will hit our localhost authorize page and we can debug in the console, but as soon as the authorize method is called, something on Epic's side appears to fail and it redirects to the error page without any information in the localhost debug. I read in Epic's documentation that the promise then()/catch() result of the authorize() is ignored, but I tried anyways and didn't get any more details.
And I've tried the Epic OAuth endpoint with Postman and receive the same client based error.
PARAMS (for readability):
response_type:code
client_id:ff9bda66-1111-2222-3333-123456789012
scope:launch%20online_access%20patient%2FPatient.read
redirect_uri:http%3A%2F%2Flocalhost%3A4200%2Fepic%2Fready
state:dev
launch:eyJhbGciO...V_A
Is this a CORS issue? I've created more than one App in the Epic sandbox and I'm using the non-production client_ids. I've waited 12+ hours to test after making edits. Any other ideas or ways to test?