Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full support for Multi form recaptcha #158

Open
timbogdanov opened this issue Sep 12, 2022 · 1 comment
Open

Full support for Multi form recaptcha #158

timbogdanov opened this issue Sep 12, 2022 · 1 comment

Comments

@timbogdanov
Copy link

Could we add full support for multiple form Recaptcha on this?

In the docs, I've read it saying that most of the time if you need Recaptcha more than once on a single page, you're doing it wrong. That can't be further from the truth.

Explain then how you go around with a login page, that accepts email and password and is validated by Recaptcha, and at the same time, has a button on the side of that same page. And that button opens a feedback form, also validated by Recaptcha.

Right now, I do see some dev support for multiple Recaptcha on the page, but it looks like it can only be done through jquery.

Any advice would be appreciated.

@rezanadimi72
Copy link

rezanadimi72 commented Feb 6, 2023

Hi @timbogdanov
you can use this scenario:

in App\Providers\AppServiceProvider
register() method
add this:
` putenv("INVISIBLE_RECAPTCHA_SITEKEY=AAAAA" );

    putenv("INVISIBLE_RECAPTCHA_SECRETKEY=BBBB" );
   `

AAAAA and BBBB set in your request

example:

in restful Api for Android and WebApplication most define two Google Recaptcha

in .env file:

`
INVISIBLE_RECAPTCHA_SITEKEY_WEB=AAA

INVISIBLE_RECAPTCHA_SECRETKEY_WEB=BBB

INVISIBLE_RECAPTCHA_SITEKEY_ANDROID=CCC

INVISIBLE_RECAPTCHA_SECRETKEY_ANDROID=DDD
`

and in register() method get request agent and set env dynamically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants