Adding phone one-time-code login to an existing education app creates a difficult boundary: an applicant should face an abuse check before account creation, while a returning learner needs a recovery path that preserves access to an existing account. Resolve that distinction before connecting the form to persistence. Short answer: in an Express signup pipeline, verify the CAPTCHA widget record and token pair before any other handler work or database access; reject failed verification with a non-retryable response. Keep account recovery as a separate decision, because passing CAPTCHA establishes neither account ownership nor entitlement to learning records.
The operational consequence is measurable without a vendor price list. A rejected submission should produce no account write and only the diagnostic evidence needed to explain the rejection. Recording every submitted token would defeat the second objective.…