Google reCaptcha error on New Register
# support
a
Good morning everybody! I have a problem, I believe it is simple to solve, but I haven't managed it yet. This is a Google reCaptcha failed error. Can anyone guide me where I configure it in Medplum? Yours sincerely; Adriano Freitas (Holyspear)
r
Hi @Adriano Freitas , I'm sorry for this inconvenience here. I'm trying to reproduce and get back to you with an asnwer
a
I had thought about modifying the RECAPTCHA_SITE_KEY environment variable but I'm not sure about that.
Good morning! Now I just tested the password reset. Again I am getting the reCaptcha error. You are my only support channel, don't give up on me. Ha ha ha ha! 😆
r
Hi @Adriano Freitas , this screenshot is helpful. I think I have a theory. How did you obtain the built version of medplum app? Did you built it from source, or download it from npm?
a
II downloaded the repository from GitHub, then we containerized the application, server, postgres, and redis, and then deployed the containers to Kubernetes. For local testing, I cloned the GitHub repository, created the containers, and uploaded them to Docker. 😀 😇
r
Ok I have a suggestion: 1. Download the zip file of the app from npm (https://www.npmjs.com/package/@medplum/app?activeTab=code) 2. You will have to edit teh file dist/assets/index-**.js 3. This has 4 placeholder strings, that you can update with you configuration:
__MEDPLUM_BASE_URL__
__GOOGLE_CLIENT_ID__
__RECAPTCHA_SITE_KEY__
__MEDPLUM_REGISTER_ENABLED__
You can replace these strings with you configuration values. Then copy them to your docker image
I know this is messy. Our tools to deploy to AWS automate this process
But we don't yet officially support on-premise deployments, you have to do some more work
a
Thank you very much @rahul1 for your attention! Well, I actually had to change 3 files, modifying recaptchaSiteKey and recaptchaSecretKey: /packages/app/.env.defaults /packages/server/test.config.json /packages/server/medplum.config.json This was enough to make "New Registration" Working with reCaptcha. However, I found another problem, on the "Reset Password" page, where I have the same error: "Recaptcha Failed". It's similar to the same issue as the "Login Issue" thread opened by @snehal_u nehal_u. Can you give a suggestion about this problem?
r
cc: @snehal_u @Adriano Freitas , sorry for the confusion. Since password reset is a project-level setting, you will have to create a
site
entry in your project and add your domain and recaptcha details there https://www.medplum.com/docs/api/fhir/medplum/project
a
@rahul1 Firstly, I'm sorry for taking so long. Thank you very much for the help and support you are giving me! This is amazing! Well, I would like to know at the moment if there is a way to disable new registrations in the Medplum Application. I looked in the documentation, but I couldn't find an option that disables this function. Can you help me?
155 Views