Repository navigation
Support profile aliases for shared Fizzy accounts - #201
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fizzy auth login TOKEN --profile NAME --account ACCOUNTfor creating an aliased profile.Intent
Fixes #200.
The reported use case is two identities working in the same Fizzy account: for example, Walter's token under profile
walterand an agent's token underwalter2. Keeping those credentials separate lets Fizzy attribute cards and other actions to the correct user, while both profiles still target the same account URL.Before this change, selecting
walteralso madewalterthe account path, resulting in/walter/boards.jsonand a 404 when the actual account was1. With this change:Migration and backward compatibility
Existing profiles do not require migration when their profile name is already the account slug or ID. A profile without account metadata continues to resolve as:
That preserves existing
config.jsonfiles, credential keys, setup/signup behavior, and account-scoped URLs.Profiles that currently use an arbitrary alias and therefore hit the reported 404 need a one-time account association. The supported path is to save each token again with the account:
This writes the Fizzy-specific account setting through the shared profile store:
Users whose alias-scoped credentials are already saved can add
extra.accountdirectly without replacing their token.There is intentionally no automatic migration for broken aliases: the old profile file does not contain enough information to infer the correct account safely, and guessing could associate the wrong user's credential with an account. New profiles created without an alias continue using the account slug as their name and need no additional metadata.
Validation
/1/boards.json.GOWORK=off make checkpasses, including vet, lint, race tests, and the CLI surface snapshot.identity showandboard listboth succeeded through the aliased profile. The temporary alias was then removed and the original configuration restored.Summary by cubic
Add profile aliases so multiple identities can share one Fizzy account by separating “profile” from “account” across the CLI. Fixes 404s from alias-as-account routing, adds
--accounttofizzy auth login, clears stale alias routing during setup/signup, preserves self-hosted Base URLs, and reports the Account’s source accurately inconfig show/explain.New Features
fizzy auth login TOKEN --profile NAME --account ACCOUNTcreates an aliased profile; token saved asprofile:NAME, requests route viaACCOUNT.setup/signup, and avoid promoting legacy tokens duringlogout;logout --allalso clears account-scoped legacy keys.auth status,auth list(adds Account column),config show/explain(adds Account with precedence and precise source, e.g., “profile walter”), quick start, anddoctor(routes checks via the account and validates access).--api-url/FIZZY_API_URL, and keeps self-hosted URLs intact when profiles are reconstructed./ACCOUNT/...using the alias’s token.Migration
fizzy auth login "$WALTER_TOKEN" --profile walter --account 1,fizzy auth login "$AGENT_TOKEN" --profile walter-agent --account 1.extra.accountto the profile inconfig.json.Written for commit aff4141. Summary will update on new commits.