Skip to content

Claim a username when you sign up - #12

Merged
nicodes merged 1 commit into
mainfrom
identity-usernames-and-orgs
Aug 3, 2026
Merged

Claim a username when you sign up#12
nicodes merged 1 commit into
mainfrom
identity-usernames-and-orgs

Conversation

@nicodes

@nicodes nicodes commented Aug 3, 2026

Copy link
Copy Markdown
Member

Client half of the identity model. Pairs with aviorstudio/termcade-be#8, which is where handles, orgs and membership live.

An account's handle is the author segment of every game it publishes, so signup asks for one and the session carries it.

$ termcade signup
username (this is your publishing handle, e.g. nicodes): nicodes
email: nico@example.com
password:
confirm password:
welcome to termcade, nico@example.com — publish as nicodes/<game>

The handle is asked first, before the email — it is the decision being made, not a field below the password. The TUI's create-account form grows the same field, shown only when signing up, and tab order puts it first for the same reason.

An account without a handle is a real state

If the name is taken between the check and the claim, the session is still good and the server says what is missing:

note: nicodes was taken just then — you are signed in, but still need a username

Nothing treats that as a failed signup, which would send someone to retry with an email that is now their own. PATCH /v1/me/username claims one later, and the same call renames.

Verified

go vet clean, full suite passes. The TUI signup test now types a handle, tabs through all three fields, and asserts the handle actually reaches the hook rather than merely rendering.

End to end against a real stack (see the backend PR): this binary resolved, downloaded and installed aviorstudio/tetris published by a plain org member.

🤖 Generated with Claude Code

An account's handle is the author segment of every game it publishes, so
signup asks for one and the session carries it. `termcade signup` prompts
for it first, before the email — it is the decision being made, not a
field below the password — and the TUI's create-account form grows the
same field, shown only when signing up.

The greeting reports it, because "publish as nicodes/<game>" is the half
an author actually needs.

An account without a handle is a real state rather than an error: if the
name is taken between the check and the claim, the session is still good
and the server says what is missing. Nothing here treats that as a
failed signup, which would send someone to retry with an email that is
now their own.

Pairs with the registry change in termcade-be, which is where handles,
orgs and membership live.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@nicodes
nicodes merged commit 1601274 into main Aug 3, 2026
1 check passed
@nicodes
nicodes deleted the identity-usernames-and-orgs branch August 3, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant