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

How to use in mobile app #110

Open
quintonn opened this issue Jan 20, 2021 · 4 comments
Open

How to use in mobile app #110

quintonn opened this issue Jan 20, 2021 · 4 comments
Labels

Comments

@quintonn
Copy link

How can the fhir client be used in a mobile app, when using a framework like apache cordova??

When using the fhir client and have a patient/clinician login, there needs to be a redirect URL.
But if it is running in a mobile app, what can the redirect URL be, or is there another way to log a user in using username+password with the FHIR client?

@vlad-ignatov
Copy link
Collaborator

I have never done it myself but I know that people are successfully using app-claimed URLs - https://www.oauth.com/oauth2-servers/redirect-uris/redirect-uris-native-apps/

@quintonn
Copy link
Author

Yes, I've seen that page too.
Since that is oauth2's page, one would think it would have links or more information on the subject.
Who else would have information on oauth2, besides oauth2 themselves?

@madaster97
Copy link

For posterity, this is the documentation I know of:
Platform-specific link association: Android, iOS, Windows, and other platforms have introduced a method by which a native app can claim an HTTPS redirect URL, demonstrate ownership of that URL, and instruct the OS to invoke the app when that specific HTTPS URL is navigated to. Apple's iOS calls this feature "Universal Links"; Android, "App Links"; Windows, "App URI Handlers". This association of an HTTPS URL to native app is platform-specific and only available on some platforms.

@madaster97
Copy link

Oh, and the AppAuth SDK for electron apps functions more like the server-side implementation of this library:

  1. Construct the authorize request URL, cache the state
  2. Open a localhost http server to listen for the redirect
  3. Open the authorize request in the system default browser
  4. Receive the auth code and state on the localhost redirect

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

No branches or pull requests

3 participants