Comments (4)
I get the same error from Cerner. Even waiting 1 second is a long time. Is no FHIR service is implementing this should the call even be made in the first place?
from client-js.
Since the .well-known/smart-configuration
endpoint is part of the spec, it would be expected that the client would query it by default. It would be reasonable though to add some sort of configuration options for adapting better to quirky legacy implementations.
from client-js.
.well-known/smart-configuration
is expected to become the default way of detecting the auth endpoints and that is why it is tried first. One of the reasons is simply that the CapabilityStatement is too big to download and too slow to parse, just to extract a few strings. I guess nobody would have expected to have to wait so much for 404 response.
I will include some kind of patch for this in the next release soon. So far I think that the best solution might be based on Promise.any, so that both are tried in parallel, no time is wasted and the faster method wins...
If you consider making a PR, please don't. I'm at the end of difficult transition to TypeScript and any PR would be very difficult to merge.
from client-js.
This should be fixed in the latest version 2.2.0
. Both /metadata
and /.well-known/smart-configuration
are requested at the same time (in parallel). Whoever arrives first is used, and the other one is canceled. This means that you should experience no slowdowns, and once your Epic instance hosts a .well-known/smart-configuration
file, you can expect your app to boot much faster.
BTW, this also lead to adding some new functionality in 2.2.0
- Aborting Requests
I should mention that there is one issue that I stumbled upon:
- The authorization is optional for a FHIR server. It is valid to have an open server that does not specify an authorize endpoint in it's
CapabilityStatement
. - However, according to the documentation at http://www.hl7.org/fhir/smart-app-launch/conformance/index.html#using-well-known, the
authorization_endpoint
is required in the well-known json. This means one cannot have an open server with well-known json, does it?
Right now I am following the spec. If the library fetches a well-known json but it does not have authorization_endpoint
or token_endpoint
, it will be discarded as invalid and the CapabilityStatement
will be used.
I hope @jmandel can share his opinion on why authorization_endpoint
and token_endpoint
are documented as required.
from client-js.
Related Issues (20)
- Support for browser using multiple SMART clients at once. HOT 3
- Unable to authorize using PKCE HOT 2
- Typo in README
- Unable to get patientId after successful login HOT 1
- (Error handling skipped on init) CompleteAuth not triggered for init HOT 1
- includeResponse not working for FHIR update operations
- "target: popup" (etc) demos don't work in current Chromium HOT 2
- Single SMART_KEY breaks authorization of several users on server-side
- Jest + RTL :: Testing with FHIRClient
- Uncaught (in promise) Error: Failed to fetch the conformance statement from "https://staging-fhir.ecwcloud.com/fhir/r4/FFBJCD/metadata". TypeError: Network request failed HOT 6
- Question: Smart-On-Fhir implementation inside Service Worker
- FHIR type Meta requiring lastUpdated property when spec allows it to be optional
- Node js After 10 min 401 unauthorized response HOT 4
- Window closes itself when it's not actually a popup
- Save token info in DB
- Support of PKCE even when the EHR .well-known configuration is not set? HOT 2
- Assumption on patient id in context
- Improve or rename "Contributing and Development" section in README
- Zombie `changelog.md` file in the project's root.
- npm audit report semver vulnerability
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from client-js.