urn:cerner:error:authorization-server:oauth2:grant:invalid-redirect-uri error

586 views
Skip to first unread message

Ozan Eren Bilgen

unread,
Sep 20, 2018, 6:51:56 PM9/20/18
to Cerner FHIR Developers
Hi,

While working on a new provider app, we received urn:cerner:error:authorization-server:oauth2:grant:invalid-redirect-uri error on redirect. We are using the smart-node client, and our code is based on to the Express example. Our app works fine in the SMART App Launcher but it cannot be launched from the Developer Portal. Below is the error message we're seeing. Can you please let us know what we should use in the Developer Portal settings and and in the code for redirect URI?
  • Issue Summary: Unable to redirect

2018-09-20 at 6.35 PM.png


  • X-Request-Id or CorrelationId: 2ecd135d-b8ad-4019-b558-9d633ce56204
Thank you,
Ozan

Hank DeDona

unread,
Sep 21, 2018, 11:52:31 AM9/21/18
to Cerner FHIR Developers
Hey Ozan,

    The error you're seeing is basically saying that the redirect_uri that you're providing in your request does not match what was originally registered. Also note, that providing the redirect_uri is not required and if not provided, will automatically redirect to the registered redirect URI.

Ozan Eren Bilgen

unread,
Sep 25, 2018, 10:42:40 AM9/25/18
to cerner-fhir...@googlegroups.com
Hi Hank,

The node library requires the redirect_uri parameter (see here and here). The node library needs a patch to make it optional. Please let me know if you prefer us to send a pull request.

Secondly we managed to make the redirect URI work for localhost as http://localhost:12345/cerner/redirect but we couldn't guess the right URI for staging servers. It would be super helpful if the error message (redirect URI does not match) also lists the actual parameter it rejected so we can debug easier. In the interim, can you let us know the redirect URI for the above correlation ID?

Best,
Ozan

--
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 post to this group, send email to cerner-fhir...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cerner-fhir-developers/0ab99837-98cf-4750-94a9-a66e53f7cfd2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jenni Syed (Cerner)

unread,
Sep 26, 2018, 2:31:11 PM9/26/18
to Cerner FHIR Developers
Hi Ozan,

The redirect URL you should be able to use is displayed in the code portal (and modifiable) for your application. In this case, it looks like your port number is incorrect in the example above. If you're having issues accessing or finding the redirect URL information in the code portal, let us know and we can try to help out.

~ Jenni
Reply all
Reply to author
Forward
0 new messages