🎉 monetr is now live! Read the announcement here. Or Sign Up!

ReCAPTCHA Configuration

ReCAPTCHA can be enabled on monetr to help prevent spamming certain endpoints in monetr’s API. Specifically it is used on the login, registration and forgot password endpoints. These endpoints are particularly sensitive, so a captcha can be a good way to reduce spam.

config.yaml
reCAPTCHA:
  enabled: <true|false>
  publicKey: "..."
  privateKey: "..."
  version: 2 # Version of the ReCAPTCHA from Google.
  verifyLogin: <true|false> # Require a valid captcha to login to monetr.
  verifyRegister: <true|false> # Require a valid captcha to create an account.
  verifyForgotPassword: <true|false> # Require a valid captcha to send password reset links.
⚠️

monetr currently only supports version 2 of ReCAPTCHA. This feature is likely to be removed in a future release or migrated to a non-Google captcha provider.

NameTypeDefaultDescription
enabledBooleanfalseEnable ReCAPTCHA for the server.
publicKeyStringThe public key string provided to you by ReCAPTCHA. This will also be provided to the UI at runtime.
privateKeyStringThe private key string provided to you by ReCAPTCHA. This is used only by the server to verify the captcha provided by clients.
versionNumber2Version of ReCAPTCHA to use. Only version 2 is supported.
verifyLoginBooleanfalseRequire a valid captcha code for requests to /api/authentication/login.
verifyRegisterBooleanfalseRequire a valid captcha code for requests to /api/authentication/register.
verifyForgotPasswordBooleanfalseRequire a valid captcha code for requests to /api/authentication/forgot.

The following environment variables map to the following configuration file fields. Each field is documented below.

VariableConfig File Field
MONETR_CAPTCHA_ENABLEDreCAPTCHA.enabled
MONETR_CAPTCHA_PUBLIC_KEYreCAPTCHA.publicKey
MONETR_CAPTCHA_PRIVATE_KEYreCAPTCHA.privateKey
MONETR_CAPTCHA_VERIFY_LOGINreCAPTCHA.verifyLogin
MONETR_CAPTCHA_VERIFY_REGISTERreCAPTCHA.verifyRegister

Note: verifyForgotPassword cannot be configured via environment variables at this time.