Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to obtain Access Token from Authorization Code #106

Open
Mysrt opened this issue Dec 6, 2018 · 3 comments
Open

Unable to obtain Access Token from Authorization Code #106

Mysrt opened this issue Dec 6, 2018 · 3 comments

Comments

@Mysrt
Copy link

Mysrt commented Dec 6, 2018

First off I'd like to say that i'm pretty new to FHIR and OAuth2 in general. I could very well just be missing something here.

I'm attempting to perform a SMART on FHIR launch utilizing this gem and the stated Oauth 2.0 workflow in the readme, but the readme doesn't seem like it would ever work? The launches i'm going through recommend redirecting to the authorization url provided in the initial launch, and then you will receive a request to your agreed upon redirect_uri. This redirect_uri then exchanges the code in the parameters for an access token.

This entire flow doesn't seem to be supported by the gem and i'm not sure how i'm supposed to utilize the gem to perform this. To make this work we've had to complete the auth outside of the gem, but I would still like to use the gem for ease of accessing APIs. I kind of have two questions.

  1. Am i correct in that the gem does not support a flow that involves a redirect_uri?
  2. Is there a way to initialize a client with an existing Access Token?
@tute
Copy link

tute commented Apr 17, 2019

You might find this conversation useful: https://groups.google.com/forum/#!topic/cerner-fhir-developers/rOJZodIJFGc

@EtienneDepaulis
Copy link
Contributor

@Mysrt We use both access token and OAuth flow here, maybe I can help ;)
Can you share with use your implementation of this gem ?

@smoyte
Copy link

smoyte commented May 1, 2019

It looks from the linked conversation that the redirect_uri flow is doable with this gem using set_bearer_token but the documentation in the README seems incomplete in terms of explaining how this flow would work. Our business will likely be using this in coming months and will post a PR with more complete documentation if so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants