Skip to content

Improve login detection#83

Merged
weikanglim merged 2 commits into
Azure:mainfrom
weikanglim:weilim/login-improvements
Jul 14, 2022
Merged

Improve login detection#83
weikanglim merged 2 commits into
Azure:mainfrom
weikanglim:weilim/login-improvements

Conversation

@weikanglim

Copy link
Copy Markdown
Contributor

- Fix internal Azure#1392 : Location prompt now first attempts `az login`
- Fix #10: Update error message to include `run azd login`
- Fix Azure#48: Detect when refresh token is expired and run automatic login
Comment thread cli/azd/cmd/login.go

@ellismg ellismg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Proposing a slight change to where we call ensureLogin but everything else looks good.

Comment thread cli/azd/cmd/login.go
Comment thread cli/azd/cmd/util.go Outdated
@azure-sdk

Copy link
Copy Markdown
Collaborator

Azure Dev CLI Install Instructions

Install scripts

MacOS/Linux

May elevate using sudo on some platforms and configurations

curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/83/uninstall-azd.sh | bash;
curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/83/install-azd.sh | bash -s -- --base-url https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/83 --version '' --verbose

Windows

powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/83/uninstall-azd.ps1' > uninstall-azd.ps1; ./uninstall-azd.ps1;"
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/83/install-azd.ps1' > install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/83' -Version '' -Verbose;"

Standalone Binary

Container

docker run -it azdevcliextacr.azurecr.io/azure-dev:pr-83

Comment thread cli/azd/pkg/tools/azcli.go
@jongio jongio added this to the Next milestone Jul 13, 2022

@ellismg ellismg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@weikanglim weikanglim merged commit 056b5ff into Azure:main Jul 14, 2022
@weikanglim weikanglim deleted the weilim/login-improvements branch February 28, 2023 01:03
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.

[Issue] Improve automatic az login detection in EnsureLoggedIn Add run azd login to 'not logged in' message.

5 participants