Skip to content

Call azd login for the user if they invoke an azd command and are not authenticated #1391

Description

@savannahostrowski

If user is not authenticated when they run an azd command we should call azd login under the hood, prompt them to login and then continue the command flow.

Today, if you call azd up and are not authenticated, you get an error. You then have to go call azd login and then azd up again.
image

The flow would ideally be:

  1. User calls azd up (or other command) unauth'd
  2. User sees prompt to authenticate
  3. User visits browser to authenticate
  4. User comes back to terminal/VS Code/Codespaces etc.
  5. azd up begins normal flow asking user for env, sub, region once authentication has succeeded.

Additional repercussions of this current behaviour: In VS Code, there is no azd login in the context menu/command palette so the experience is inconsistent if you are invoking commands from the context menu or command palette because you can call all other commands from those interfaces but have to use the embedded terminal for azd login.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/core-cliCLI commands, cmd/, internal/cmd/enhancementNew feature or improvementneeds-discussionNeeds team discussion before proceeding

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions