Skip to content

[Profile] az login: Add back the warning that a browser is opened - #14505

Merged
Jiashuo Li (jiasli) merged 3 commits into
Azure:devfrom
jiasli:login-browser
Nov 4, 2020
Merged

Jiashuo Li (jiasli) merged 3 commits into
Azure:devfrom
jiasli:login-browser

Conversation

@jiasli

Copy link
Copy Markdown
Contributor

Description

Revert the change in #10851. The removal of the warning message that a browser is opened leads to confusions: MicrosoftDocs/azure-docs-cli#2093, #14473.

If the browser fails to open (due to some unknown reasons), Azure CLI will hang forever and the user won't know what to do next.

> az login
_

With this PR, the warning is shown again:

> az login
The default web browser has been opened at https://login.microsoftonline.com/common/oauth2/authorize. Please continue the login in the web browser.
If no web browser is available or if the web browser fails to open, use device code flow with `az login --use-device-code`.

Testing Guide

az login

@yonzhan

Copy link
Copy Markdown
Collaborator

add to S173

@yonzhan Yong Zhang (yonzhan) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread src/azure-cli-core/azure/cli/core/_profile.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants