Problems authenticating cerner github example app

107 views
Skip to first unread message

Jorge Rivera

unread,
Oct 26, 2019, 4:16:23 PM10/26/19
to Cerner FHIR Developers
Hi everyone

I've been trying to embed the example-smart-app from github into a django application, I've created an app as a provider in code.cerner.com, I'm using stu2 and set the launch and redirect URIs to my django app. After launching the app and selecting the patient, the launch uri is called but when the time comes to go to the redirect URI I see a page showing an error message stating that the redirect URI is not the same as the one provided in the app that triggers the launch.

This is the message I get from the response URL:
https://authorization.sandboxcerner.com/errors/urn%3Acerner%3Aerror%3Aauthorization-server%3Aoauth2%3Agrant%3Ainvalid-redirect-uri/instances/6c1324ae-3fff-418e-bee0-c0cefe815b3f?persona=provider&client=XXXXX&tenant=XXXXX

cerner-app-error-00.png



Am I missing some hidden step here?

Regards

Aman Khatri

unread,
Oct 26, 2019, 5:55:00 PM10/26/19
to cerner-fhir...@googlegroups.com
I see that same error when I use spring boot. And I could never figure it out. So I had to manually obtain tokens to process request. I haven’t been able to find any solution to it.

Sent from my iPhone

On Oct 26, 2019, at 4:16 PM, Jorge Rivera <jorge....@ssde.com.mx> wrote:


Hi everyone

I've been trying to embed the example-smart-app from github into a django application, I've created an app as a provider in code.cerner.com, I'm using stu2 and set the launch and redirect URIs to my django app. After launching the app and selecting the patient, the launch uri is called but when the time comes to go to the redirect URI I see a page showing an error message stating that the redirect URI is not the same as the one provided in the app that triggers the launch.

This is the message I get from the response URL:
https://authorization.sandboxcerner.com/errors/urn%3Acerner%3Aerror%3Aauthorization-server%3Aoauth2%3Agrant%3Ainvalid-redirect-uri/instances/6c1324ae-3fff-418e-bee0-c0cefe815b3f?persona=provider&client=XXXXX&tenant=XXXXX


Am I missing some hidden step here?

Regards

--
You received this message because you are subscribed to the Google Groups "Cerner FHIR Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cerner-fhir-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cerner-fhir-developers/55b717b4-36f1-4ec8-91bd-1d8fa7c8c163%40googlegroups.com.
<cerner-app-error-00.png>

Benjamin Eichhorn (Cerner)

unread,
Oct 28, 2019, 9:02:44 AM10/28/19
to Cerner FHIR Developers
Hello,

Per the error message listed in your screenshot. The redirect URL you have configured within the code Portal differs from the requested redirect URL. 

Thank you,
Ben (Cerner)

Jorge Rivera

unread,
Oct 29, 2019, 11:25:28 PM10/29/19
to Cerner FHIR Developers
Hello

What method did you use to manually get the tokens? is it with the same URL provided by cerner?

Regards


On Saturday, October 26, 2019 at 4:55:00 PM UTC-5, gmailUser wrote:
I see that same error when I use spring boot. And I could never figure it out. So I had to manually obtain tokens to process request. I haven’t been able to find any solution to it.

Sent from my iPhone

On Oct 26, 2019, at 4:16 PM, Jorge Rivera <jorge...@ssde.com.mx> wrote:


Hi everyone

I've been trying to embed the example-smart-app from github into a django application, I've created an app as a provider in code.cerner.com, I'm using stu2 and set the launch and redirect URIs to my django app. After launching the app and selecting the patient, the launch uri is called but when the time comes to go to the redirect URI I see a page showing an error message stating that the redirect URI is not the same as the one provided in the app that triggers the launch.

This is the message I get from the response URL:
https://authorization.sandboxcerner.com/errors/urn%3Acerner%3Aerror%3Aauthorization-server%3Aoauth2%3Agrant%3Ainvalid-redirect-uri/instances/6c1324ae-3fff-418e-bee0-c0cefe815b3f?persona=provider&client=XXXXX&tenant=XXXXX



Am I missing some hidden step here?

Regards

--
You received this message because you are subscribed to the Google Groups "Cerner FHIR Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cerner-fhir-developers+unsub...@googlegroups.com.

Jorge Rivera

unread,
Oct 29, 2019, 11:32:53 PM10/29/19
to Cerner FHIR Developers
Hello Benjamin

I already checked that, if I just start in my launch URL without launching it from CERNER, it asks me for the fhirServerUrl and the redirectUri, I copy-pasted both parameters from my app configuration and processing the authentication from the browser console it does reply, goes to the redirect and sends me an error about the fetchAll function.

So, the redirect works but doesn't launching the app from here https://code.cerner.com/developer/smart-on-fhir/apps

Any ideas?

Regards

Benjamin Eichhorn (Cerner)

unread,
Oct 31, 2019, 11:46:28 AM10/31/19
to Cerner FHIR Developers
Hi Jorge,

I apologize, but I'm not sure I am understanding. From a general perspective, you should always launch your app from the code Console. 

Another great resource you might look into is our SMART on FHIR tutorial which will guide you trough the whole process. It's an open source project and walks through the authorization process so it might be helpful. https://engineering.cerner.com/smart-on-fhir-tutorial/

If you can expand on what you're attempting to do (make sure to provide the X-Request-ID for any errors you see) I can try and assist further.

Thanks,
Ben (Cerner)

Wilfred Prabhu

unread,
Oct 31, 2019, 3:48:28 PM10/31/19
to Cerner FHIR Developers
Hello,

I got the same error. I'm unable to fix it. Please let me know if you find solution.

Thanks,
Wilfred
Reply all
Reply to author
Forward
0 new messages