Is there a Google reCAPTCHA v3 package compatible with Angular 18?

Discussão em 'Angular' iniciado por neha, Abril 4, 2025.

  1. neha

    neha Guest

    I'm migrating a project from Angular 11 to Angular 18 and need to integrate Google reCAPTCHA v3.

    Previously, I used:

    "angular-recaptcha3": "^2.0.0"

    Now, I’m trying to use:

    "ng-recaptcha": "^13.2.1"

    But ng-recaptcha officially supports only up to Angular 17, and I'm currently on Angular 18.2.13.

    When I run npm install, I get peer dependency errors because ng-recaptcha expects Angular 17.

    As a workaround, I’m using the following in package.json:

    "overrides": { "ng-recaptcha": { "@angular/core": "18.2.13", "@angular/common": "18.2.13" } } While this allows the install to succeed, I’m unsure if this is stable or future-proof.

    Is there a reCAPTCHA v3 package that officially supports Angular 18?

    Or is there a better workaround to make ng-recaptcha work reliably with Angular 18?

    Continue reading...

Compartilhe esta Página