snelsi / next-recaptcha-v3

⭐ Straightforward solution for using ReCaptcha in your Next.js application
MIT License
123 stars 9 forks source link

Recaptcha badge appears on all routes after client-side navigation #165

Closed coderrshyam closed 1 week ago

coderrshyam commented 1 week ago

Describe the bug The Recaptcha badge is supposed to appear only on the /authroute as configured. However, when performing client-side navigation from /auth to other routes, the badge remains visible on those routes, which is unintended behavior.

To Reproduce Steps to reproduce the behavior:

  1. Configure next-recaptcha-v3 to display the badge only on the /auth route.
  2. Navigate to /auth.
  3. Perform client-side navigation to any other route (e.g., /about or /dashboard).
  4. Observe that the badge remains visible on the new route.

Expected behavior The Recaptcha badge should only be visible on the /auth route and should not persist after navigating to other routes

Current Behavior The badge appears on the /auth route as expected but remains visible after navigating to other routes via client-side navigation.

Desktop (please complete the following information):

Additional context

snelsi commented 1 week ago

Not a bug

https://github.com/snelsi/next-recaptcha-v3/issues/136 https://github.com/snelsi/next-recaptcha-v3/issues/155

If you don't like the ReCaptcha tag floating in the corner, just hide it, using the following CSS:

.grecaptcha-badge {
    visibility: hidden;
}
coderrshyam commented 1 week ago

Thanks bro. I need one answer is your package have an long term support. Not likely to google-recaptha-v3

snelsi commented 1 week ago

This library is essentially just one script and one hook, so there is not much to break. Google is also unlikely to introduce any breaking changes in v3.