diff options
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.js | 8 |
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); |