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

fix: fetch captcha V3 token after first form input #1693

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading