I'm testing my SMART on FHIR application on Epic AppOrchard using hyperspace simulator. OAuth 2.0 authorization flow works fine with Epic 2017 version but when I change it to Epic 2018 or 2019, I'm required to Sign In with Epic Account instead of redirected to redirect URL.
Here is template of my authorization request that fails for Epic 2018/19: https://apporchard.epic.com/interconnect-aocurprd-oauth/oauth2/authorize?scope=launch&response_type=code&redirect_uri=[redirect_uri]&client_id=[client_id]&launch=[launch_token]&state=[state]
Almost same authorization request is sent for both the 2018 and 2017 versions of Epic but only version 2017 works.
Here is screenshot of sign-in screen I'm facing in Epic 2018/2019.
Any solution or workaround would be highly appreciated.
Just found the answer in Epic documentation that for Epic version 2018 onward application has to add "launch" scope to get the permission to obtain launch context when app is launched from an EHR.
So changing my scope parameter helped.
"scope": "launch patient/*.read openid profile online_access"