Commit graph

6 commits

Author SHA1 Message Date
cad1e68cae
dev work 2026-07-10 13:00:03 -07:00
6e7977997e
Fix contact form action processing for "reset" being nested incorrectly 2026-07-02 11:48:35 -07:00
6c56b203d3
Switch all db storage to session storage
All checks were successful
Build And Deploy / build-and-deploy (push) Successful in 1m27s
Only affects CapAdapter, challenge.ts, and redeem.ts.
2026-02-07 18:13:45 -08:00
e67e72ea66
Handle reset and OTP errors in contact form
Add a "reset" action to the form and clear session data when invoked.
Return a structured OTP error (nextAction: send_msg, field: otp, error: ...)
instead
of throwing so the UI can stay on the verification step. Remove noisy
console logs and include SMS provider message in service errors. Update
contact.astro to surface field-level errors, split the form into
fieldsets, add a "Go Back" reset button, and make small UI/layout tweaks.
2026-01-27 10:47:04 -08:00
8e35387841
Switch to Cap invisible widget, add form drafts to middleware, and improve OTP
validation

Use the Cap client widget in the contact UI with status icons and auto-solve,
replacing the capwidget element. Normalize and tighten phone validation by
splitting
normalizePhone and isValidPhone in the Otp lib and use it in contact action
validation. Replace loose text validation with a character-stripper helper.
Also bump several dependencies and adjust middleware to save and restore form
data for
form actions.
2026-01-27 09:49:06 -08:00
f2f42a84b5
Add contact actions and migrate contact form to Astro actions
Implement send_otp and send_msg handlers with server-side validation,
captcha verification, OTP generation/verification, rate limiting,
session-backed multi-step flow, and SMS gateway integration.

Replace broken contact endpoint and types with Astro server actions;
delete endpoints/contact.ts, types/ContactForm.ts and
src/components/ContactForm.astro. Update pages/contact.astro to use
astro:actions and improve captcha handling (listen for solve and set
hidden input). Adjust OTP timing (step 60s → 300s, VALID_PAST_OTP_STEPS
5 → 1). Add validator, @types/validator, Prettier and
prettier-plugin-astro; include .prettierrc.mjs in tsconfig include.

Add Prettier config for Astro
2026-01-22 14:04:27 -08:00