Hi, hope all is well? I was wondering if anyone ...
# general
u
Hi, hope all is well? I was wondering if anyone have attempted to use https://clerk.com/ as an auth provider? I am trying to make it work following the instructions I have found here -> https://clerk.com/docs/quickstarts/clerk-oauth2?utm_source=www.google.com&utm_medium=referral&utm_campaign=none and here -> https://www.medplum.com/docs/auth/external-ids but so far was not able to make this work Thanks in advance ๐Ÿ™‚
r
Great question - so the documentation you linked to on the Medplum side is actually for external identifiers, but the guide you want for auth is this one: https://www.medplum.com/docs/auth/external-identity-providers This is the sample repo: https://github.com/medplum/medplum-client-external-idp-demo Perhaps the place to start is getting the sample to work with Clerk?
u
Oups posted the wrong link ๐Ÿ˜…that is the doc I was looking at currently also trying to make Clerk work in the sample repo, if I make it work I shall share the instructions here
making progress now able to sign in with Clerk, but getting this error once signed in ->
r
just touched base with JB - he mentions he is in touch and will let us know if there is something on Medplum side!
u
quick update: unfortunately we where not able to make it work using Clerk so for now we switched to Auth0
we where not able to get the token when doing ->
Copy code
curl --location 'https://adequate-crane-0.clerk.accounts.dev/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: __cf_bm=[COOKIE \
--data-urlencode 'grant_type=authorization_code' \
--data-urlencode 'client_id=nL8EyJsUWKhTEGK3' \
--data-urlencode 'client_secret=[SECRET]' \
--data-urlencode 'code=[CODE]' \
--data-urlencode 'redirect_uri=[OUR_HOSTED_MEDPLUM]/auth/external' \
--data-urlencode 'scope=profile'
we would be returned with ->
Copy code
{
  "error": "server_error",
  "error_description": "The authorization server encountered an unexpected condition that prevented it from fulfilling the request"
}