Authorization workflow not working through postman

170 views
Skip to first unread message
Assigned to Fenil....@cerner.com by me

shraddha gupta

unread,
Aug 30, 2022, 7:55:36 PM8/30/22
to Cerner FHIR Developers
Hello Team,

I am trying to programmatically retrieve an access_token for my provider facing app registered in code console (EHR launch). I am able to do the following via a C# code:
1. Launch the app by selecting a patient from the sandbox and retrieve iss and launch value.
2. Using the iss and appending /metadata, retrieve the authorise and token endpoints
3. Use the authorize endpoint with below parameters
  • client_id  = My provide app client id
  • scope =  scope for the user
  • aud =  Base URL of Fhir server, same as iss
  • launch = launch value retrieved in #1
  • response_type = code
  • redirect_uri = My app registered redirect_uri
4. I am expecting to get redirected to my redirect_uri and retrieve a code and state value. But instead the response to the http request is 200 OK and html body "Javascript must be enabled in your browser."

Javascript error response.PNG
Appreciate the help.

Thanks and Regards,
Shraddha G.

Fenil Desani (Cerner)

unread,
Aug 31, 2022, 8:35:52 AM8/31/22
to Cerner FHIR Developers
Hello Shraddha G,

You need to use web browser to launch the App.
If you plan to use postman, you will need to leverage the Postman's OAuth2 Authorization https://learning.postman.com/docs/sending-requests/authorization/#oauth-20

Thanks,
Fenil

shraddha gupta

unread,
Aug 31, 2022, 11:05:06 AM8/31/22
to Cerner FHIR Developers

Hello Fenil,

The email subject was a bit misleading, apologize for it.

I am launching the app through browser, once the app endpoint is hit, i am using the launch token passed in the URL and the iss to get the authorize and token endpoints. 

Further to this, i am using the authorize endpoint + the required parameters to obtain the code and state parameter. But getting the above html response for javascript enabling. I am doing all this through a c# program.

For other EHR auth workflows, i am able to get the code and state parameter but not for cerner.

I am using postman just to double check the response i am getting through program and its same both places.

Please suggest.

Thanks and Regards,
Shraddha G.

Fenil Desani (Cerner)

unread,
Sep 1, 2022, 11:39:42 AM9/1/22
to Cerner FHIR Developers
Are you getting a screen like this? If so, you need to make sure Javascript is enabled in your browser.
Screen Shot 2022-09-01 at 10.38.33 AM.png

shraddha gupta

unread,
Sep 1, 2022, 2:17:29 PM9/1/22
to Cerner FHIR Developers
Yes, Javascript is enabled on my browser. I have written a c# code to obtain the EHR access token by following the "authorization on behalf of user" workflow. 

I am still facing this issue where i don't get redirected to my redirect_uri along with the code and state parameter.

The response to this request is "Javascript needs to be enabled on your browser"

Thanks and Regards,
Shraddha G

shraddha gupta

unread,
Sep 12, 2022, 9:55:16 AM9/12/22
to Cerner FHIR Developers
Hello Team,

Any suggestions on above issue?. I am trying to write a plain C# code, to authenticate with Cerner during EHR Launch.  Please refer above email for detailed error.

Thanks and Regards,
Shraddha G.

Reply all
Reply to author
Forward
0 new messages