-
Notifications
You must be signed in to change notification settings - Fork 0
feat(auth): require explicit login subcommand
#182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
fcc28fb
e51a604
5e13502
82ed0a6
cebb194
7315db8
6467212
5dce860
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -156,7 +156,9 @@ fn main() { | |
| // never blocked (see `update::should_check`). | ||
| let gate_update = !matches!( | ||
| &cli.command, | ||
| None | Some(Commands::Upgrade) | Some(Commands::Completions { .. }) | ||
| None | Some(Commands::Upgrade) | ||
| | Some(Commands::Completions { .. }) | ||
| | Some(Commands::Auth { command: None }) | ||
| ); | ||
| if gate_update { | ||
| update::enforce_latest_or_exit(); | ||
|
|
@@ -170,10 +172,19 @@ fn main() { | |
| } | ||
| Some(cmd) => match cmd { | ||
| Commands::Auth { command } => match command { | ||
| None | Some(AuthCommands::Login) => auth::login(), | ||
| Some(AuthCommands::Login) => auth::login(), | ||
| Some(AuthCommands::Register { email }) => auth::register(email), | ||
| Some(AuthCommands::Status) => auth::status("default"), | ||
| Some(AuthCommands::Logout) => auth::logout("default"), | ||
| None => { | ||
| use clap::CommandFactory; | ||
| let mut cmd = Cli::command(); | ||
| cmd.build(); | ||
| cmd.find_subcommand_mut("auth") | ||
| .unwrap() | ||
| .print_help() | ||
| .unwrap(); | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking (re-raised from cycle 1, still unaddressed): This PR changes bare
The PR's stated goal is consistency; leaving these pointing at the removed shortcut is contradictory. The
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking (re-raised from cycles 1 & 2, still unaddressed): This PR changes bare
The PR's stated goal is consistency; leaving these pointing at the removed shortcut is contradictory. The
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking (re-raised from cycles 1, 2 & 3 — still unaddressed): This PR changes bare
The PR's stated goal is consistency; leaving these pointing at the removed shortcut is contradictory. The |
||
| }, | ||
| Commands::Query { | ||
| sql, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This behavior change leaves several user-facing hints that still tell users bare
hotdata authwill log them in — they're now incorrect and should be updated in this PR:src/sdk.rs:460-463(blocking):"Run {} to log in, or pass --api-key."with"hotdata auth". This is the clearest break — it only references barehotdata auth, which now just prints help. A user hitting an expired session who follows this hint will not be logged in. It should point athotdata auth login.src/sdk.rs:818:"... Run 'hotdata auth login' (or 'hotdata auth') to re-authenticate."— the(or 'hotdata auth')parenthetical is now wrong.src/config.rs:267:"... Run 'hotdata auth login' (or 'hotdata auth') or specify --workspace-id."— same stale parenthetical.src/config.rs:287:"Run 'hotdata auth login' (or 'hotdata auth') to generate a new config file."— same.src/jwt.rs:15(doc comment):"user musthotdata authagain"— minor, but worth updating for accuracy.The PR's goal is consistency, so leaving these pointing at the removed shortcut is contradictory.