Hey there Medplum team! May I ask a technical ques...
# general
o
Hey there Medplum team! May I ask a technical question here about connectign OAuth using the
MedplumClient
from
@medplum/core
client and Medplum docker image together?
In the Medplum
server
source code, we see that the
oauth/authorize
endpoint expects a
scope
param to be a non-empty string. While trying to leverage the `MedplumClient`'s
signInWithRedirect
method, I get an
invalid_request
error. There's no more detail than that so I think the issue is that
scope
is not provided provided but the
signInWithRedirect
method accepts no arguments so there's no way to provide that in the method call. I managed to set a
scope
param by manually specifying the
authorizeUrl
to what I need plus
?scope=exampleScope
but that feels kinda hacky and only gets me slightly further. The Medplum server redirects me to
<MY-APP-ORIGIN>/oauth
without a token, cookie etc. Am I missing something? Have I forgotten something about the OAuth2 flow?
r
Hey @opiation. , this is a good catch! I've filed a ticket here for updating the client library, and I'll let you know when we've released a new version: https://github.com/medplum/medplum/issues/1388
o
Thanks!
184 Views