Skip to content

Commit

Permalink
fix: fetch captcha V3 token after first form input (#1693)
Browse files Browse the repository at this point in the history
  • Loading branch information
SGrueber authored Jul 4, 2024
1 parent 53e3d00 commit 0d69d51
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ export class CaptchaV3Component implements OnInit {
ngOnInit() {
this.parentForm.get('captchaAction').setValidators([Validators.required]);

// as soon as the form gets valid request a captcha token every 2 minutes
// as soon as the user starts editing the form request a captcha token every 2 minutes
if (!SSR) {
this.parentForm.statusChanges
.pipe(
filter(status => status === 'VALID'),
take(1),
switchMap(() =>
timer(0, 2 * (60 - 3) * 1000).pipe(
Expand Down

0 comments on commit 0d69d51

Please sign in to comment.