[SMTNC-228] Add captcha token regeneration after form submission#974
Open
larodiel wants to merge 13 commits into
Open
[SMTNC-228] Add captcha token regeneration after form submission#974larodiel wants to merge 13 commits into
larodiel wants to merge 13 commits into
Conversation
Implemented a new function to regenerate captcha tokens for Google reCAPTCHA v3, Cloudflare Turnstile, and hCaptcha after form submissions. This ensures users can submit the form multiple times without encountering token issues. Updated the form handling logic to call this function upon successful form reset.
…stile and hCaptcha
Contributor
|
🎉 Zip build complete |
gilbert-hernandez
requested changes
Apr 23, 2026
…eader functionality and improve mobile breakpoint handling. Added methods for managing header height and responsive behavior based on viewport size.
…in the captcha block. Update JavaScript to retrieve the site key from the data attribute for token regeneration, improving the handling of reCAPTCHA v3 tokens during form submissions.
gilbert-hernandez
approved these changes
Apr 23, 2026
Contributor
gilbert-hernandez
left a comment
There was a problem hiding this comment.
Looks good. Thanks!
…l-after-the-first-successful-submission
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kadence/* packages ship source only (dist/ is gitignored). bun skips prepare scripts for git dependencies, so dist/ is missing after install. Add an explicit npm install + build step matching the eslint workflow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
bun migrates package-lock.json entries as git-clone URLs, which fails in CI. Without --frozen-lockfile, bun resolves github: shorthands via tarball download instead, which works without SSH or git credentials. No bun.lockb is committed yet so --frozen-lockfile provided no reproducibility benefit anyway. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ge resolution Bun migrates from package-lock.json when no bun.lockb exists, using git+https:// resolved URLs that require git-cloning the @kadence/* repos. Deleting the npm lockfile forces bun to use package.json's github: shorthands, which it fetches via tarball API instead — no git-clone, no auth required. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The @kadence/* packages reference each other via ssh:// URLs in their own package.json files. GitHub Actions has no SSH key, so npm install fails with a publickey error. Rewriting ssh://git@github.com/ and git@github.com: to https://github.com/ allows public repo clones without auth. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… builds git config --global writes to ~/.gitconfig but npm's spawned git subprocess doesn't reliably inherit it. Setting GIT_CONFIG_GLOBAL to an explicit temp file guarantees all git processes in the step (including npm's internal calls) use the SSH-to-HTTPS URL rewrite. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kadence/helpers declares @kadence/icons as a git+https dependency, causing npm install to hit GitHub on every CI job. --omit=prod skips production deps entirely and only installs the devDependencies (babel) needed to build. Babel transpiles syntax only and does not resolve imports, so the missing runtime dep does not affect the build output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
@ravinderk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎫 Ticket
KAD-5541
SMTNC-228
🎥 Artifacts
Before Fix
Screen.Recording.2026-04-22.at.16.47.11.mov
After Fix
Screen.Recording.2026-04-22.at.16.45.27.mov
🗒️ Description
Users were unable to submit forms multiple times when using reCAPTCHA v3, Turnstile, or hCaptcha. The first submission worked, but subsequent attempts failed with a captcha error.
Added
regenerateCaptchaTokens()function that:✔️ Checklist
Block specific checklist (where relevant)