-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Problem
The --app flag description says "The app ID or name (defaults to current app)", but in all auth keys commands (get, list, create, current, switch, revoke, update), flags.app is used directly as an app ID without resolving names:
let appId = flags.app || this.configManager.getCurrentAppId();This means --app "My App" will fail because the name is passed directly to the Control API URL (/apps/${appId}/...) which expects an actual app ID.
Expected behavior
--app should resolve names to IDs using resolveAppIdFromNameOrId() (or use resolveAppId(flags) / requireAppId(flags) which already handle this).
Affected commands
auth keys getauth keys listauth keys createauth keys currentauth keys switchauth keys revokeauth keys update
Suggested fix
Replace the direct flags.app || pattern with await this.resolveAppId(flags) or await this.requireAppId(flags), which already check flags.app first and resolve names before falling back to getCurrentAppId().
Note: auth keys get has special logic to extract app ID from APP_ID.KEY_ID format args — that path would need to be preserved.
Found via PR #171 review.