Error: Cannot read properties of undefined (readin...
# support
s
Hello Medplum Team, I'm facing an issue while trying to register a new account on the Medplum platform . After filling in the form details, I get the following error: Cannot read properties of undefined (reading 'digest') Could you please help identify the issue and provide steps to resolve it? https://cdn.discordapp.com/attachments/1391682941779968111/1391682942782279720/wORdcNzWKrtAQAAAABJRU5ErkJggg.png?ex=686cc93d&is=686b77bd&hm=1addc6cd93b164ac74e1bf7a3268c9338f64af1e6f8a86420d49b969e36411a2&
r
Hi there! It looks like from your URL bar that the application is not hooked up to DNS and therefore the reCAPCHA won't work and neither will registration. You'll need to set up DNS, then sign up for a reCAPTCHA site key, update it and restart the server. One thing to consider is registering for an account on hosted Medplum, in which case those are already set up.
s
we want to disable the recaptcha and go with IP is this possible ?
r
@Sheeba Nilofer another thing you might want to check is if this works with https? Some of our authentication work relies on
crypto
web libaries, which are only available in secure contexts: https://stackoverflow.com/questions/57146558/typeerror-digest-of-undefined-in-development-environment
Echo @reshma 's suggestion to start on hosted Medplum, which omits the need to set up SSL certificiates
s
Thanks for the replies.
Now we are getting another issue while trying to register a new user
endpoint : https://med-api.procyonts.com/auth/newuser response: { "resourceType": "OperationOutcome", "id": "not-found", "issue": [ { "severity": "error", "code": "not-found", "details": { "text": "Not found" } } ], "extension": [ { "url": "https://medplum.com/fhir/StructureDefinition/tracing", "extension": [ { "url": "requestId", "valueId": "f71c880f-ac2b-48c2-b93c-3c67da9a88c1" }, { "url": "traceId", "valueId": "a9264121-c3fa-4552-98b5-93304dfe39d5" } ] } ] }
f
Hi @Sheeba Nilofer , can you confirm that registerEnabled is set to true on your config?
Also, could it be a url routing problem? Can you check that your equivalent to https://api.medplum.com/healthcheck is working?
s
@finnbergquist It is working fine from our end
f
OK gotcha. This is a known issue with SubtleCrypto when running over plaintext HTTP on a non-localhost address. The only fix is to use localhost or use a reverse proxy with HTTPS like nginx or HAProxy in front of Medplum. It is a feature of the browser to protect users from potentially generating cryptographically secure data in an environment where there is potentially MIIM attacks, or leaking secrets they just generated in plaintext More info: https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto https://github.com/authts/oidc-client-ts/issues/1550
s
@finnbergquist All the things which you have mentioned are implemented but it is not working
157 Views