fix: google-add now also sets profile.json email

The invite command reads email from profile.json, not auth.json.
google-add was only writing to auth.json so invite had no address
to send to. Now calls set_email() as well.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-03-27 21:32:48 -04:00
parent 7438031797
commit ce806e52ed

View File

@@ -163,8 +163,9 @@ def cmd_google_add(args):
# Ensure the user directory exists
(settings.home_root() / username).mkdir(parents=True, exist_ok=True)
# Store email; google_sub will be filled in on first sign-in
# Store in auth.json (google_sub filled in on first sign-in) + profile.json (for invites)
link_google(username, sub="", email=email)
set_email(username, email)
print(f"Google sign-in registered for {username!r}: {email}")
print(f"They can now sign in at {settings.cortex_base_url}/login using that Google account.")