enter.html: email-verification companion (#31) — verify-sent view, resend, verified/expired states #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/enter-email-verify"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Frontend companion for the backend email-verification flow (cairn-license-server #34 / #31). Built surgically on the existing page — OAuth, topo hero, reset/invite views and all current behaviour untouched.
What it adds
verifysentview ("Check your inbox") — new<section id="v-verifysent">in the existing.panels, reusing.vt/.sub/.btn/.linkrow. Tabs hidden here (added toshow()'s hide condition and toVIEWS).201 {token}→enter()exactly as today (flag off);202 {status:"verify_sent"}→ the new screen with the email filled in.handle()gained an optionalonSuccesshook; the three other callers are unchanged.post()now keepserr.reason; a403 {reason:"unverified"}routes to the verify-sent screen (login-worded) instead of a generic error./v1/verify/resendand reports "Sent — check your inbox again."verifyConsume()(mirrorsoauthConsume(), wired into the entry point andhashchange) handles#verified(green confirm on sign-in) and#verify-failed(red error → Create account).Dormant by default
When the backend flag
REQUIRE_EMAIL_VERIFICATIONis off (today), register returns a token and signs in exactly as before — none of the new paths trigger. So this is safe to merge now and only comes alive when the flag is set.Preview
Open
enter.html#verifysent,#verified,#verify-failedto see each state without a running backend. Applied via anchored splices (assert count==1 each); both script blocks passnode --check.Before flipping the backend flag later, confirm
PUBLIC_ORIGINpoints at whereverenter.htmlis served (so the verify link's…/enter.html#verifiedredirect lands here).