Skip to content

Problem with Invisible reCaptcha. Each time when I am back to a page where reCaptcha was loaded there a new reCapcha's iframe appeared under body element #30

@lexeek

Description

@lexeek

First of all thanks for work you've already done! Really nice solution.

Problem:

Each time when I am back to a page where reCaptcha was loaded there a new reCapcha's iframe appears under a "body" element but previous loaded iframes not removed.
And that leads me to the error in case when I made login and then logout:
in that time recaptcha loaded again on login page with new iframe.
Is it possible to destroy recaptcha component on recaptchaSuccess callback?

Reproducing:

To reproduce this, just open the example page (https://enngage.github.io/ngx-captcha/) and check a "body" element after moving between pages for example Quick Start and Invisible Captcha.
When you are on Invisible reCaptcha example page - click on reload several times.
Then wait forawile and check a console output you should see an errors like that:

I have faced with that errors in my application and dont know how to solve them.

  • image

  • image

Another problem with writing workable spec for my login component with reCapture

Also I have strange errors in jasmine tests for my login component where I have ngx-invisible-recaptcha component.

I have simple login form component with ngx-invisible-recaptcha component.
and I have a simple "should create" test, and also seems I've added all dependencies, I suspect that it depends on NgZone and runOutsideAngular (tried spyOn it, but it has not helped) method or something else. Error is really strange and it occurs from time to time (i have googled a lot and did not find correct solution xD ) When I removed component, error disappeared

image

Hope you can help. Thanks in advance!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions