Relationships
#1194 swamp auth login prompts are confusing — "username" only accepts email, and --username is re-prompted
Opened by kneel · 7/16/2026· Shipped 7/17/2026
A few small papercuts in the interactive login flow that together make the prompt feel unreliable:
"Username or email" only accepts an email. signIn() posts to /api/auth/sign-in/email with body: { email: username } (src/infrastructure/http/swamp_club_client.ts:118), so whatever is typed lands in the email field of an email-only endpoint. A bare username won't work, despite the Username or email: prompt and the --username flag.
--username gets ignored and re-prompted. readCredentials() always asks for both fields (login.ts:179-183), so swamp auth login --no-browser --username alice still prints Username or email:, reads the answer, and discards it (username ?? creds.username, line 256) before asking for the password. Looks broken even though it technically works.
Piping a password doesn't work. With non-TTY stdin, readPassword() returns "" (login.ts:133-135), so printf 'pass\n' | swamp auth login ... ends in "Username and password are required." No stdin/env option for automation.
Repro:
swamp auth login --no-browser --username alice # still asks for username, then discards it
printf 'pass\n' | swamp auth login --no-browser --username alice # empty password → errorSuggestions:
- Relabel the prompt/flag to
Email:/--email, or make usernames actually work. - When
--usernameis given, prompt only for the missing password. - Add a non-interactive password option (stdin or
SWAMP_PASSWORD).
Environment: swamp 20260716.194319.0-sha.df9fc306.
Shipped
Click a lifecycle step above to view its details.