Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat(auth): privy login updates with changelog sync
nirholas039e01eb690f
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex ec6b5e823..2a1c65614 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -8,6 +8,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Agent Launches** (`/launches`) — Live public feed of every coin launched by a three.ws agent — market caps, graduation status, and the agent behind each launch.- **Cosmetics shop purchases now work** — Buying a premium skin or emote in the /play Cosmetics shop actually opens the payment flow now. Previously the Buy buttons failed because the in-world shop never loaded the payment widget — now it loads on demand the moment you tap Buy, the USDC checkout opens with the item priced by rarity, and a sale made inside a coin's world still credits that coin's creator. Pay once on Base or Solana and the item is yours forever. (`/play`) `[fix]`+- **Email sign-in works again** — Signing in with an email code on the login and register pages was failing with an authorization error before the code was ever sent. The sign-in flow now completes the security check (a Cloudflare Turnstile verification, invisible for most people) before requesting your code, so the six-digit email code arrives and login works end to end. (`/login`) `[fix, security]`- **Forge a 3D model right on the homepage** — The homepage now has a live slice of Forge. Type a description of an object — or tap an example — and the real text-to-3D pipeline reconstructs a textured mesh and drops an interactive 3D model into the page, usually in seconds, that you can orbit and download as GLB. Anything you forge there also shows up in the full Forge gallery on the same device. (`/forge`) `[feature]`- **Forge's free Draft engine no longer loses finished models** — Generating on Forge's free Draft engine finished successfully on the server, but the page kept waiting and eventually reported a timeout — the model you'd already paid the wait for never appeared. The free engine returns its result immediately rather than as a background job, and the page now recognizes that, so Draft generations land on screen the moment they're ready. (`/forge`) `[fix]`- **New /launches page: every agent-launched coin in one live feed** — There is now a public feed of every coin launched by a three.ws agent at /launches — live market caps, graduation badges, buyback rates, and a card linking straight to the agent behind each launch. Agent profile pages also gained a launch history: every coin an agent has ever launched is listed on its page with a live market cap and a link into the public feed. Find it in the nav under Discover → Agent Launches. (`/launches`) `[feature]`diff --git a/data/changelog.json b/data/changelog.jsonindex b5138d2dc..9ab94fe18 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1097,6 +1097,16 @@"fix"],"link": "/forge"+ },+ {+ "date": "2026-06-12",+ "title": "Email sign-in works again",+ "summary": "Signing in with an email code on the login and register pages was failing with an authorization error before the code was ever sent. The sign-in flow now completes the security check (a Cloudflare Turnstile verification, invisible for most people) before requesting your code, so the six-digit email code arrives and login works end to end.",+ "tags": [+ "fix",+ "security"+ ],+ "link": "/login"}]}diff --git a/public/changelog.json b/public/changelog.jsonindex c23949623..89d972a7e 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-12T03:00:05.870Z",+ "generated_at": "2026-06-12T03:07:02.271Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -26,6 +26,17 @@"fix"]},+ {+ "date": "2026-06-12",+ "type": "update",+ "title": "Email sign-in works again",+ "summary": "Signing in with an email code on the login and register pages was failing with an authorization error before the code was ever sent. The sign-in flow now completes the security check (a Cloudflare Turnstile verification, invisible for most people) before requesting your code, so the six-digit email code arrives and login works end to end.",+ "link": "/login",+ "tags": [+ "fix",+ "security"+ ]+ },{"date": "2026-06-12","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex af5111783..f777a674c 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -22,6 +22,14 @@<category>fix</category><description>Buying a premium skin or emote in the /play Cosmetics shop actually opens the payment flow now. Previously the Buy buttons failed because the in-world shop never loaded the payment widget — now it loads on demand the moment you tap Buy, the USDC checkout opens with the item priced by rarity, and a sale made inside a coin's world still credits that coin's creator. Pay once on Base or Solana and the item is yours forever.</description></item>+ <item>+ <title>Email sign-in works again</title>+ <link>https://three.ws/login</link>+ <guid isPermaLink="false">2026-06-12:Email sign-in works again</guid>+ <pubDate>Fri, 12 Jun 2026 12:00:00 GMT</pubDate>+ <category>fix</category>+ <description>Signing in with an email code on the login and register pages was failing with an authorization error before the code was ever sent. The sign-in flow now completes the security check (a Cloudflare Turnstile verification, invisible for most people) before requesting your code, so the six-digit email code arrives and login works end to end.</description>+ </item><item><title>Forge a 3D model right on the homepage</title><link>https://three.ws/forge</link>diff --git a/public/features.json b/public/features.jsonindex 3bb75e3c3..61e8a5fc2 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-12T03:00:05.858Z",+ "generated_at": "2026-06-12T03:07:02.254Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/public/login.html b/public/login.htmlindex 156cec139..8bb2fad3f 100644--- a/public/login.html+++ b/public/login.html@@ -319,6 +319,7 @@.privy-row-btn:hover:not(:disabled) { background: #e8ecf4; }.privy-row-btn:disabled { opacity: 0.4; cursor: default; }#privy-inline-err { margin: 6px 0 0; font-size: 12px; color: #ff9a9a; }+ #privy-captcha-slot:not(:empty) { margin-top: 10px; display: flex; justify-content: center; }.privy-back-link {display: inline-block; margin-top: 8px; font-size: 12px;color: #444; cursor: pointer; background: none; border: none;@@ -535,6 +536,7 @@<input id="privy-email-input" type="email" inputmode="email" placeholder="Email address" autocomplete="email" autocapitalize="none" autofocus /><button type="button" id="privy-send-btn" class="privy-row-btn">Send code</button></div>+ <div id="privy-captcha-slot" aria-live="polite"></div></div><div id="privy-step-code" hidden><p class="privy-code-hint">Code sent — check your inbox</p>diff --git a/public/register.html b/public/register.htmlindex 3d4bab877..2d3ec90a9 100644--- a/public/register.html+++ b/public/register.html@@ -420,6 +420,7 @@.privy-row-btn:hover:not(:disabled) { background: #e8ecf4; }.privy-row-btn:disabled { opacity: 0.4; cursor: default; }#privy-inline-err { margin: 6px 0 0; font-size: 12px; color: #ff7a7a; }+ #privy-captcha-slot:not(:empty) { margin-top: 10px; display: flex; justify-content: center; }.privy-back-link {display: inline-block; margin-top: 8px; font-size: 12px;color: #555; cursor: pointer; background: none; border: none;@@ -476,6 +477,7 @@<input id="privy-email-input" type="email" inputmode="email" placeholder="Email address" autocomplete="email" autocapitalize="none" /><button type="button" id="privy-send-btn" class="privy-row-btn">Send code</button></div>+ <div id="privy-captcha-slot" aria-live="polite"></div></div><div id="privy-step-code" hidden><div class="privy-row">diff --git a/src/privy-login.js b/src/privy-login.jsindex 4747332d8..30b2c33a8 100644--- a/src/privy-login.js+++ b/src/privy-login.js@@ -33,7 +33,78 @@ if (!appId) {if (divider) divider.style.display = 'none';} else {const privy = new Privy({ appId, storage: new LocalStorage() });- mountPrivyUI(privy);+ mountPrivyUI(privy, fetchCaptchaConfig(appId));+}++// ── CAPTCHA (Cloudflare Turnstile) ───────────────────────────────────────────+// Privy rejects passwordless/init with 401 invalid_credentials when the app has+// CAPTCHA enabled and no token is sent, so this must resolve before sendCode.++async function fetchCaptchaConfig(id) {+ try {+ const r = await fetch(`https://auth.privy.io/api/v1/apps/${id}`, {+ headers: { 'privy-app-id': id },+ });+ if (!r.ok) return null;+ const cfg = await r.json();+ if (!cfg?.captcha_enabled || !cfg.captcha_site_key) return null;+ if (cfg.enabled_captcha_provider && cfg.enabled_captcha_provider !== 'turnstile') return null;+ // Privy prefixes Turnstile site keys with "t:".+ return { siteKey: cfg.captcha_site_key.replace(/^t:/, '') };+ } catch {+ return null;+ }+}++let turnstilePromise = null;++function loadTurnstile() {+ if (turnstilePromise) return turnstilePromise;+ turnstilePromise = new Promise((resolve, reject) => {+ if (window.turnstile) { resolve(window.turnstile); return; }+ window.__privyTurnstileOnload = () => resolve(window.turnstile);+ const script = document.createElement('script');+ script.src = 'https://challenges.cloudflare.com/turnstile/api.js?onload=__privyTurnstileOnload&render=explicit';+ script.async = true;+ script.onerror = () => {+ turnstilePromise = null;+ reject(new Error('Could not load the CAPTCHA verifier. Check your connection and try again.'));+ };+ document.head.appendChild(script);+ });+ return turnstilePromise;+}++let captchaWidgetId = null;+let pendingCaptcha = null;++async function requestCaptchaToken(siteKey) {+ const turnstile = await loadTurnstile();+ const slot = document.getElementById('privy-captcha-slot');+ if (!slot) throw new Error('CAPTCHA container missing from page.');+ return new Promise((resolve, reject) => {+ const timer = setTimeout(() => {+ pendingCaptcha = null;+ reject(new Error('CAPTCHA timed out. Try again.'));+ }, 90_000);+ pendingCaptcha = {+ resolve(token) { clearTimeout(timer); pendingCaptcha = null; resolve(token); },+ reject(err) { clearTimeout(timer); pendingCaptcha = null; reject(err); },+ };+ if (captchaWidgetId === null) {+ captchaWidgetId = turnstile.render(slot, {+ sitekey: siteKey,+ appearance: 'interaction-only',+ execution: 'execute',+ callback: (token) => pendingCaptcha?.resolve(token),+ 'error-callback': () => pendingCaptcha?.reject(new Error('CAPTCHA verification failed. Try again.')),+ 'timeout-callback': () => pendingCaptcha?.reject(new Error('CAPTCHA timed out. Try again.')),+ });+ } else {+ turnstile.reset(captchaWidgetId);+ }+ turnstile.execute(slot);+ });}// ── Shared backend verify ─────────────────────────────────────────────────────@@ -70,7 +141,7 @@ function getSolanaProvider() {// ── UI ───────────────────────────────────────────────────────────────────────-function mountPrivyUI(privy) {+function mountPrivyUI(privy, captchaConfigPromise) {// Email OTP elementsconst stepEmail = document.getElementById('privy-step-email');const stepCode = document.getElementById('privy-step-code');@@ -142,7 +213,14 @@ function mountPrivyUI(privy) {sendBtn.textContent = 'Sending…';clearErr();try {- await privy.auth.email.sendCode(email);+ let captchaToken;+ const captcha = await captchaConfigPromise;+ if (captcha) {+ sendBtn.textContent = 'Verifying…';+ captchaToken = await requestCaptchaToken(captcha.siteKey);+ sendBtn.textContent = 'Sending…';+ }+ await privy.auth.email.sendCode(email, captchaToken);pendingEmail = email;showStep('code');codeInput?.focus();diff --git a/vercel.json b/vercel.jsonindex 0d9ac5a31..1e77930f0 100644--- a/vercel.json+++ b/vercel.json@@ -98,7 +98,7 @@{"src": "/(login|register|forgot-password|reset-password|account|settings|wallet|pay|paywall|vanity-wallet|eth-vanity|evm-wallet|dashboard|dashboard-next|dashboard-classic)(/.*)?$","headers": {- "content-security-policy": "frame-ancestors 'self'; base-uri 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: https://cdn.jsdelivr.net https://cdnjs.cloudflare.com https://unpkg.com https://esm.sh https://ajax.googleapis.com https://s3.tradingview.com https://platform.twitter.com https://3d-agent.vercel.app https://three.ws https://3d.irish; worker-src 'self' blob:; report-uri /api/client-errors",+ "content-security-policy": "frame-ancestors 'self'; base-uri 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: https://cdn.jsdelivr.net https://cdnjs.cloudflare.com https://unpkg.com https://esm.sh https://ajax.googleapis.com https://s3.tradingview.com https://platform.twitter.com https://challenges.cloudflare.com https://3d-agent.vercel.app https://three.ws https://3d.irish; worker-src 'self' blob:; report-uri /api/client-errors","x-frame-options": "SAMEORIGIN"},"continue": true