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

MedplumClient constructor ignores accessToken #3065

Closed
rahul1 opened this issue Oct 17, 2023 · 0 comments · Fixed by #3066
Closed

MedplumClient constructor ignores accessToken #3065

rahul1 opened this issue Oct 17, 2023 · 0 comments · Fixed by #3066
Assignees
Labels
bug Something isn't working fhir-datastore Related to the FHIR datastore, includes API and FHIR operations

Comments

@rahul1
Copy link
Member

rahul1 commented Oct 17, 2023

Repro

  • Log into Medplum app in browser
  • Copy the medplum access token from local storage
  • Create a Medplum client as follows
const medplum = new MedplumClient({
      fetch: async (url: string, options?: any) => await fetch(url, options),
      token: medplumToken 
    });
  • Call medplum.graphql(SOME_QUERY)

Expected Behavior

Query completes successfully

Actual Behavior

Unauthenticated error

Workaround

Call medplum.setAccessToken, rather than using constructor parameter

@rahul1 rahul1 added bug Something isn't working fhir-datastore Related to the FHIR datastore, includes API and FHIR operations labels Oct 17, 2023
@rahul1 rahul1 added this to the Milestone Quality milestone Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fhir-datastore Related to the FHIR datastore, includes API and FHIR operations
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants