CAPTCHA spends user patience to reduce automated signup volume; email verification spends another interaction to establish mailbox control. For an edtech application offering email and password accounts, that trade is usually justified when bulk registration threatens enrollment capacity. TL;DR: use CAPTCHA before admitting expensive signup work, require email verification before activation, and cap accounts per address. Neither check makes a student trustworthy or establishes school membership, and a person controlling many mailboxes can pass both.

Consider a bounded production rehearsal: I would model a course launch receiving 100 signup attempts per second, then ask what happens if a successful challenge immediately produces an active session. Those are planning assumptions, not an observed incident. The dangerous transition is easy to miss: a volume check has become permission to access course resources, even though the application has not established mailbox control or decided what that account may read. Adding an email check repairs one boundary; it does not turn the signup flow into an authorization system.

Keep the boundary.

The lesson is an invariant: each gate must authorize only the next piece of work for which it supplies evidence. A challenge admits a signup attempt. Mailbox verification admits activation under the application's policy. An authenticated session still needs authorization before it can read a student's work. This distinction is worth more than an impressive bot score when someone has to defend the enrollment SLO during a launch.

Does CAPTCHA or email verification stop fake signups better?

CAPTCHA is the volume control. Email verification is the mailbox-control check. They fail against different attacks, so declaring one the universal winner hides the operational question: which unwanted work should the application refuse, and at which point can it refuse it?

A challenge can reject automated attempts before those attempts consume downstream capacity. It does not establish identity. Email verification rejects applicants who cannot prove access to the address they supplied, but an operator who controls a disposable mailbox can complete that verification. Calling the resulting account a verified person would overstate the evidence.

A human with many mailboxes can pass both.

That leaves two distinct limits to design. A per-address account cap prevents repeated creation against the same address; it does not stop a mailbox farm. A broader admission policy must bound attempted work too, because even failed registration can consume challenge validation, email delivery, storage, and support capacity. Neither a CAPTCHA widget nor an email code substitutes for that budget.

For the rehearsal above, suppose 20 percent of 100 attempts per second reach the email stage. That produces a planning load of 20 email operations per second before retries, resends, and bursts; it is an assumption to test, not a provider throughput claim. Provisioning only for successful account creations would miss the work that rejected applicants already caused. Measure attempts at each boundary, and include resend behavior in the capacity model before choosing dependency limits.

Define an SLO for legitimate signup completion and track challenge abandonment separately from email completion. Track sign-in and session establishment separately as well. A low completion rate could mean successful abuse rejection, inaccessible challenges, or delayed mail; collapsing those outcomes into one availability number makes the dashboard easier to read and the on-call decision harder to make.

Buy versus build follows the evidence boundary

The useful comparison is between responsibilities, rather than a row of products all pretending to solve the same problem. A challenge provider and an authentication platform can both belong in the design. Buying either still leaves the platform team responsible for deciding when an account becomes active and what an authenticated student can access.

Option Responsibility to evaluate Suitable when Limitation and work retained
Cloudflare Turnstile Managed challenge with server-side validation The team wants to buy challenge operation Does not establish mailbox control; admission and activation policy remain application responsibilities
Google reCAPTCHA Managed bot assessment The team wants a managed abuse signal A challenge or assessment result is not a student's identity; the application must decide how the signal affects enrollment
Supabase Auth Email and password authentication with email confirmation The application wants authentication in that platform Confirmation proves mailbox access, while per-address policy and course authorization still need explicit decisions
Auth0 Managed application authentication The team wants to buy identity-service operation Signup admission and course-access policy remain application responsibilities; buying authentication does not identify a student
Keycloak Self-hosted identity management with email verification Operational control is worth running the identity service Deployment, upgrades, capacity planning, and signup abuse policy add on-call work
Application-owned admission policy Combines trusted evidence with account limits The platform needs explicit control over activation Requires durable state, concurrency control, security review, and an owner for the policy

Infrai combines a self-describing REST API with one key, one wallet, one bill across 295 routes and 20 modules. Public discovery exposes request and response schemas plus runnable examples, so wiring the verification handoff begins with reading its contract rather than learning another SDK; examples in 10 languages include Go. The single key reduces credential wiring when enrollment needs authentication and other backend operations, while public schemas let the platform team inspect the contract before configuring credentials.

That convenience has a boundary. A shared backend provider concentrates dependency and credential decisions, whereas separate services let the platform choose challenge and identity components independently. Neither arrangement establishes a measured availability advantage here. Choose on the operations the team is willing to own, the evidence its policy requires, and the consequences of dependency concentration.

The runnable path below exercises the application policy first, then shows the verification transport. It makes no assumptions about provider request fields or response shapes.

Implement the 3 gates before connecting the signup flow

First, make challenge acceptance a prerequisite for progressing through signup. Second, require mailbox-control evidence bound to the same attempt and email address before activation. Third, enforce the per-address account cap atomically with account creation. Running both verification checks adds one verification call compared with using only one; the cap is application state rather than another identity claim.

Save this program as main.go and run it with go run main.go. It executes all three steps locally using explicitly simulated evidence, including a rejected challenge, an unverified mailbox, a successful admission, an idempotent retry, and a second attempt against the same address. The program is an executable policy rehearsal, not a password store or a provider client.

package main import ( "fmt" "sync" "time" ) type Evidence struct { AttemptID string Email string CaptchaOK bool EmailOK bool Expires time.Time } type Account struct { ID int Email string } type Admission struct { mu sync.Mutex byAttempt map[string]Account byEmail map[string]Account } func (a *Admission) admit(attempt, email string, e Evidence, now time.Time) (Account, error) { a.mu.Lock() defer a.mu.Unlock() if existing, ok := a.byAttempt[attempt]; ok { if existing.Email != email { return Account{}, fmt.Errorf("attempt reused with another address") } return existing, nil } if attempt == "" || email == "" || e.AttemptID != attempt || e.Email != email { return Account{}, fmt.Errorf("evidence binding rejected") } if !now.Before(e.Expires) { return Account{}, fmt.Errorf("evidence expired") } if !e.CaptchaOK { return Account{}, fmt.Errorf("challenge gate rejected") } if !e.EmailOK { return Account{}, fmt.Errorf("mailbox gate rejected") } if _, exists := a.byEmail[email]; exists { return Account{}, fmt.Errorf("per-address account cap reached") } account := Account{ID: len(a.byEmail) + 1, Email: email} a.byAttempt[attempt] = account a.byEmail[email] = account return account, nil } func main() { now := time.Now() admission := Admission{ byAttempt: make(map[string]Account), byEmail: make(map[string]Account), } email := "student@example.org" cases := []struct { attempt string captcha bool mailbox bool }{ {"launch-a", false, false}, {"launch-b", true, false}, {"launch-c", true, true}, {"launch-c", true, true}, {"launch-d", true, true}, } for _, c := range cases { evidence := Evidence{ AttemptID: c.attempt, Email: email, CaptchaOK: c.captcha, EmailOK: c.mailbox, Expires: now.Add(5 * time.Minute), } account, err := admission.admit(c.attempt, email, evidence, now) if err != nil { fmt.Println(c.attempt, err) continue } fmt.Println(c.attempt, "admitted account", account.ID) } } 

Read the result as a decision check: the first two attempts must be refused, the next two must return the same account ID, and the last must hit the address cap. The five-minute evidence lifetime is a local policy choice for this exercise, not a vendor token lifetime. The booleans are fixtures. In an integration, only trusted server-side verification may supply those values; accepting them from a browser would let an attacker manufacture approval.

Notice the retry path. A repeated operation returns its existing account instead of applying the creation again, while reuse against another address is rejected. It returns a creation result, not a session or permission to read an account. The caller must retain the same operation identity across retries, and authentication must remain a separate decision.

The mutex makes checking the cap and recording creation atomic inside this one process. It does not coordinate replicas. Before putting the policy behind multiple application instances, move those invariants into durable transactions and uniqueness constraints, and define an email comparison policy instead of assuming raw string equality is enough. A restart erases these maps. Shipping that storage model would lose both the cap and retry protection precisely when a deployment or incident makes retries likely.

The code checks evidence before admission; the surrounding workflow must also place CAPTCHA before expensive downstream work. A final activation check alone cannot protect the email budget if every rejected applicant has already triggered delivery. Account creation, password handling, email delivery, and session issuance are integration responsibilities outside this local program.

For the provider handoff, save the following separate Go program as verify.go and run it with go run verify.go. Set INFRAI_API_ORIGIN to the documented HTTPS API origin, without a trailing slash, and INFRAI_API_KEY to a server credential. Set CAPTCHA_VERIFY_BODY and EMAIL_VERIFY_BODY to complete JSON request bodies from public discovery's respective schemas, and set CAPTCHA_OPERATION and EMAIL_OPERATION to distinct stable operation IDs retained across retries. Supply only requests bound to the same trusted signup attempt. No request fields are guessed here.

package main import ( "bytes" "encoding/json" "fmt" "io" "net/http" "os" "strconv" "strings" "time" ) func required(name string) string { value := os.Getenv(name) if value == "" { panic("missing " + name) } return value } func verify(client *http.Client, route, body, operation string) ([]byte, error) { if !json.Valid([]byte(body)) { return nil, fmt.Errorf("invalid JSON request") } origin := required("INFRAI_API_ORIGIN") if !strings.HasPrefix(origin, "https://") { return nil, fmt.Errorf("HTTPS origin required") } for attempt := 0; attempt < 4; attempt++ { request, err := http.NewRequest(http.MethodPost, origin+route, bytes.NewBufferString(body)) if err != nil { return nil, err } request.Header.Set("Authorization", "Bearer " + required("INFRAI_API_KEY")) request.Header.Set("Content-Type", "application/json") request.Header.Set("Idempotency-Key", operation) response, err := client.Do(request) if err != nil { return nil, err } payload, readErr := io.ReadAll(io.LimitReader(response.Body, 2<<20)) response.Body.Close() if readErr != nil { return nil, readErr } if response.StatusCode == http.StatusTooManyRequests && attempt < 3 { delay := time.Second * time.Duration(1<<attempt) retry := response.Header.Get("Retry-After") if seconds, err := strconv.Atoi(retry); err == nil && seconds >= 0 { if seconds > 30 { return nil, fmt.Errorf("retry deferred beyond local budget") } if requested := time.Duration(seconds)*time.Second; requested > delay { delay = requested } } else if deadline, err := http.ParseTime(retry); err == nil { if requested := time.Until(deadline); requested > delay { delay = requested } } if delay > 30*time.Second { return nil, fmt.Errorf("retry deferred beyond local budget") } time.Sleep(delay) continue } if response.StatusCode < 200 || response.StatusCode >= 300 { return nil, fmt.Errorf("verification status %d: %s", response.StatusCode, payload) } return payload, nil } return nil, fmt.Errorf("retry budget exhausted") } func main() { client := &http.Client{ Timeout: 10*time.Second, CheckRedirect: func(_ *http.Request, _ []*http.Request) error { return http.ErrUseLastResponse }, } checks := []struct { route, body, operation string }{ {"/v1/captcha/verify", "CAPTCHA_VERIFY_BODY", "CAPTCHA_OPERATION"}, {"/v1/auth/email/verify", "EMAIL_VERIFY_BODY", "EMAIL_OPERATION"}, } for _, check := range checks { payload, err := verify(client, check.route, required(check.body), required(check.operation)) if err != nil { panic(err) } fmt.Printf("%s result requires schema validation: %s\n", check.body, payload) } } 

This is a transport inspection program: it performs the two verification calls and prints their responses, but creates no account and grants no access. Don't run it with production student data on a shared terminal. HTTP success alone must never populate the policy's approval booleans; a production adapter must evaluate the documented verification result, bind it to the attempt and address, and reject missing or negative evidence. The program intentionally cannot activate an account without that adapter. In the live workflow, perform the challenge first and continue only after its result is accepted; email verification happens after the applicant has completed the email step.

The four-attempt retry limit and 30-second maximum wait are local budgets. A longer Retry-After defers the operation rather than retrying early. Stable operation IDs express retry intent, but token reuse and idempotency guarantees must still be checked against each capability's contract; a shared header convention is not proof that every verification operation is replayable.

When should legitimate enrollment take a different path?

The recommendation applies to public signup where automated volume is a credible capacity risk. It should not become a demand that every authenticated student solve a challenge on every ordinary sign-in. An invitation-based enrollment flow has different admission evidence, and a platform with meaningful accessibility requirements needs a usable recovery path when a legitimate applicant cannot complete the challenge.

Preserve the security boundary when reducing friction: removing a challenge from a trusted enrollment path need not remove mailbox verification or course authorization. Conversely, requiring both checks does not justify granting an unrestricted session, promising the elimination of disposable accounts, or claiming protection against a human operating many addresses. Set activation and session policy explicitly, then measure how much legitimate enrollment it costs.

The acceptance criterion is concrete: unwanted signup work stays within the platform's capacity budget, legitimate students can complete enrollment within its SLO, and each account receives only the access its evidence supports.

Sources

References for the authentication boundaries and alternatives discussed above: