Smart Backend Services - Invalid Client - OAuth2.0

278 views
Skip to first unread message

tejinder...@gmail.com

unread,
Sep 4, 2020, 12:37:32 PM9/4/20
to SMART on FHIR
Hello Everyone ,

Hope you all are doing good and safe !!

 

I am facing below error while Using a JWT to Obtain an Access Token for a Backend Service using OAuth2.0.

below is the error in response.

{
  "error": "invalid_client",
  "error_description": null
}
I am using Smart backend services using oauth2.0 and I am following this link https://apporchard.epic.com/Article?docId=oauth2&section=BackendOAuth2Guide.

 

I created a pair of private and public keys using openssl.

 

below is the body I passed as ` .

application/x-www-form-urlencoded`
grant_type=client_credentials&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer&client_assertion=eyJhbGciOiJSUzM4NCIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJmYWQwMmFhZS1hY2Q1LTQyZmEtYTkzOS00ZTg3ZjMwNGEwMWQiLCJzdWIiOiJmYWQwMmFhZS1hY2Q1LTQyZmEtYTkzOS00ZTg3ZjMwNGEwMWQiLCJhdWQiOiJodHRwczovL2FwcG9yY2hhcmQuZXBpYy5jb20vaW50ZXJjb25uZWN0LWFvY3VycHJkLW9hdXRoL29hdXRoMi90b2tlbiIsImp0aSI6ImRhZWUxZmU4LWU4ZGUtNGU2OC1iNWNjLTE2ZDE4ZDlkMTI1OCIsImV4cCI6MTU5OTIzMjQ5NSwibmJmIjoxNTk5MjMyMTk1LCJpYXQiOjE1OTkyMzIxOTV9.peu9W8-pthB6HawokShFwQUUQr-a2w0bnI-krjQ1p2b-wjfxrgR1hW8heLGIDKsDQVa2HZx1yIh1zrXN_nkI6Q4ZLuBX7RchQjJD9pMpM6X9ErvknLVeFe__nopODuMp7J5NAa6G6Xq3rYDZVRvw1jtbtKI0Wu1S7JIORIAKhM90n8mpOfQrR7Pyt9QnxLZjbQLeqQVwUYsZ088-LVVj9esOaQJ9FcC5ySaC6pg61va1Uxbe-JsAiIr2kbTpU7DUkQcZvAax8t2Stb22vgWTTzcdwp1igqpoEY-U2dY2o3doUAi4cCtmitrYHgkH1mcWrQ8fsLQHAM2sV9qn4P9erg
below is my token description:-

{
  "alg": "RS384",
  "typ": "JWT"
}
{
  "iss": "fad02aae-acd5-42fa-a939-4e87f304a01d",
  "sub": "fad02aae-acd5-42fa-a939-4e87f304a01d",
  "jti": "daee1fe8-e8de-4e68-b5cc-16d18d9d1258",
  "exp": 1599232495,
  "nbf": 1599232195,
  "iat": 1599232195
}
all the above info is being used to create a token. I tried many times but no luck. Please help.

 

Thanks

Sandra Anoop

unread,
Oct 8, 2020, 4:43:01 PM10/8/20
to SMART on FHIR

Hi Tej,

Hope you are doing good and safe.

Could you please tell me if you were able to have success in the backend services integration?

Thanks,
Sandra

Paul Nelson

unread,
Oct 8, 2020, 8:01:02 PM10/8/20
to Sandra Anoop, SMART on FHIR
Sandra, Tej and everyone,

Greetings, I am also planning to move my OAuth2.0 to the backend. Could you please point me toward some examples and/or documentation? Any help is very much appreciated. Thanks.

P

--
You received this message because you are subscribed to the Google Groups "SMART on FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smart-on-fhi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/smart-on-fhir/40d306a4-0376-4e16-b623-decf929411f3n%40googlegroups.com.

Josh Mandel

unread,
Oct 8, 2020, 9:54:42 PM10/8/20
to Paul Nelson, Sandra Anoop, SMART on FHIR
Can you clarify what specifically you're aiming to do, and what kind of examples you're looking for? I'm recording a series of "guided walk" videos and looking for topics that will be helpful for the community.

Best,
Josh

Sandra Anoop

unread,
Oct 9, 2020, 4:23:11 PM10/9/20
to SMART on FHIR
Hi Josh, 
Thanks for replying! Please find the post below about the issue. Could you please go through and  let me know if you have faced any similar issue. 
https://groups.google.com/u/1/g/smart-on-fhir/c/2mxGLywulIQ
Reply all
Reply to author
Forward
0 new messages