Skip to content

auth login fails on v2.0.7: service validation error on fresh install and legacy "cloud" configs #74

@hyww

Description

@hyww

Describe the bug
After upgrading to v2.0.7, mongocli auth login fails in two scenarios due to service type validation errors. The command appears to require the service to be explicitly set to cloud-manager even on fresh installs or existing valid configs.

To Reproduce

Scenario 1: Fresh Installation

  1. Perform a fresh installation of MongoCLI v2.0.7 (no existing config file).
  2. Run mongocli auth login.
    . See error: Error: this command is only supported for cloud-manager, not ""`

Scenario 2: Existing Config (service=cloud)

  1. Use an existing configuration where service is set to cloud (common in some 1.x versions?).
  2. Run mongocli auth login.
  3. See error: Error: this command is only supported for cloud-manager, not "cloud"

Expected behavior

  1. On a fresh install, mongocli auth login should either default to cloud-manager or allow the login process to proceed without a pre-existing config file.
  2. The CLI should recognize cloud as a valid alias for cloud-manager or automatically migrate the config to ensure backward compatibility.

Screenshots
If possible, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macOS 14.1
  • MongoCLI version 2.0.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions