diff options
Diffstat (limited to 'packages/meshbay-cli/src/meshbay_cli/commands')
| -rw-r--r-- | packages/meshbay-cli/src/meshbay_cli/commands/account.py | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/packages/meshbay-cli/src/meshbay_cli/commands/account.py b/packages/meshbay-cli/src/meshbay_cli/commands/account.py index 2137995..4499f0b 100644 --- a/packages/meshbay-cli/src/meshbay_cli/commands/account.py +++ b/packages/meshbay-cli/src/meshbay_cli/commands/account.py @@ -66,9 +66,6 @@ def add_parser(sub, parent) -> None: p.add_argument("--recovery-key-file", metavar="FILE", help="reset: read the recovery key from FILE, to restore your keys " "on the nodes") - p.add_argument("--email-recovery-key", action="store_true", - help="register: also send the recovery key with the verification " - "e-mail") p.add_argument("--no-remember", action="store_true", help="reset: sign in afterwards without storing the session") p.add_argument("-y", "--yes", action="store_true", @@ -206,29 +203,23 @@ async def _register(ctx: Context) -> int: raw, mnemonic = generate_recovery() try: try: - reg = await ctx.hub.register(username, email, ak, - mnemonic if a.email_recovery_key else None, - await _captcha(ctx)) + reg = await ctx.hub.register(username, email, ak, await _captcha(ctx)) except HubError as e: if e.detail not in ("captcha_failed", "captcha_required"): raise # An answer is spent once checked; a fresh one, once. - reg = await ctx.hub.register(username, email, ak, - mnemonic if a.email_recovery_key else None, - await _captcha(ctx)) + reg = await ctx.hub.register(username, email, ak, await _captcha(ctx)) except HubError as e: raise _hub_refusal(e, "Not registered") from e if ctx.args.json: print(json.dumps({"user_id": reg.get("user_id"), "username": username, "recovery_key": mnemonic, - "recovery_key_emailed": bool(a.email_recovery_key), "email_verification_required": True})) else: print(f"Account {safe(username)} created on {ctx.hub.url}.\n\n" - "Your recovery key — shown this once, kept nowhere by MeshBay" - + (" (it is also in the verification e-mail)" if a.email_recovery_key - else "") + ":\n\n" + "Your recovery key — shown this once, kept nowhere by MeshBay, never " + "sent to the hub:\n\n" f" {mnemonic}\n\n" "Keep it somewhere safe, apart from your passphrase. If you forget the " "passphrase, it is what gives you your groups back.") |