aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/auth-page.js
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-30 17:13:40 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-30 17:13:40 +0200
commitb1ebcdeb9082457972c41a47e77494902335d262 (patch)
treeb19384b868197ecda88ce79765a0f60812dbc815 /packages/meshbay-hub/src/meshbay_hub/static/auth-page.js
parent6d167392f6f8ede37e2794a68a3738f8ba03131d (diff)
downloadmeshbay-b1ebcdeb9082457972c41a47e77494902335d262.tar.gz
feat: browser access, decided in the desktop application
Off for an account made there: its identities stay on the device and nothing is left on nodes. Turned on from the Profile page behind a native confirmation; each node is settled when its group next opens. The hub keeps a mirror a browser reads to say why a group will not open; it grants nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/auth-page.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/auth-page.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/auth-page.js b/packages/meshbay-hub/src/meshbay_hub/static/auth-page.js
index 8e67e20..d3d3bd7 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/auth-page.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/auth-page.js
@@ -409,9 +409,15 @@ export function RegisterPage() {
// username and every key derivation must fold in the same string.
// `captcha.token` rides along — the submit button is already disabled
// until it is set when a captcha is configured (see the form below).
- await window.MeshBayKeys.registerUser(
+ const reg = await window.MeshBayKeys.registerUser(
name, email, password, emailRecovery ? rk.mnemonic : null,
captcha.token);
+ // An account made in the desktop application starts without browser
+ // access: its identities stay on this device and nothing of them is
+ // left on nodes until the person turns it on, here, natively.
+ if (reg.userId && await platform.nativeKeys()) {
+ try { await platform.keys.createdHere(reg.userId); } catch { /* kept on */ }
+ }
setRecoveryMnemonic(rk.mnemonic);
session.recoveryKey =
await window.MeshBayKeys.deriveRecoveryKey(rk.mnemonic, name);