Allow dynamic setting of the secret and the sitekey in a reCaptcha

Hi,
Pages and server actions using reCaptcha need to be configured with a string provided by Google. This configuration in Wappler is static.

When the Development and the Production environments are different, these strings need to be changed manually every time the code is deployed. This is error prone and time consuming.

It would be great if the reCaptcha’s Site Key (in a page) and the Secret (in a Server Action) could be configured dynamically. This way, one could keep these strings in a DB table and set them up in the respective widgets according to the environment or region where the code is running.

I hope this description of the request is clear enough. Please let me know otherwise.

Many thanks in advance,

Alex

Hi @Teodor,
Is there any chance of getting this in the development queue?

1 Like

Bump for this feature request (but most of team is in vacation now)

This is what I use for the Server Action (server-side):

{{$_ENV.RECAPTCHA_SECRET_KEY}}

This is what I use on the front-end, for NodeJS, on the Site Key field:

<%=_('$_ENV.RECAPTCHA_SITE_KEY',locals)%>
2 Likes

I’ve just hit this one fellas. I’ll try the workaround suggested above, but this seems an obvious one to fix in the use of ENV variables.

2 Likes