Skip to content

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

Open

Description

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions