Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign-in: Use browser for interactive sign-in #75

Closed
chrmarti opened this issue Jul 9, 2018 · 4 comments
Closed

Sign-in: Use browser for interactive sign-in #75

chrmarti opened this issue Jul 9, 2018 · 4 comments
Assignees

Comments

@chrmarti
Copy link
Contributor

chrmarti commented Jul 9, 2018

It has been suggested that this would simplify the user interactions to sign in.

The Azure CLI implemented this first: Azure/azure-cli#6593

@chrmarti chrmarti self-assigned this Jul 9, 2018
@chrmarti chrmarti changed the title login: use browser for interactive login Sign-in: Use browser for interactive sign-in Jul 9, 2018
@chrmarti
Copy link
Contributor Author

chrmarti commented Jul 11, 2018

Notes from @yugangw-msft:

In short:

  1. CLI spins up a web server listening on a local port (make sure to open the port as loopback so the port can’t be reached from external)
  2. CLI launches a browser with the AAD authentication url and registers the replay-url of http://localhost:port through the query string
  3. Once the user get authenticated in the browser, AAD will redirect back to the http://localhost:port with the authorization code that your code in the web server will use to exchange for a token

https://github.com/Azure/azure-cli/blob/e084890e275faf532f1f82b9ea66cde90a8d447b/src/azure-cli-core/azure/cli/core/_profile.py#L1020

@chrmarti
Copy link
Contributor Author

Turns out we cannot use the same approach because it is not (or no longer) supported by AAD.

chrmarti added a commit that referenced this issue Jan 4, 2019
@chrmarti
Copy link
Contributor Author

chrmarti commented Jan 4, 2019

Available in 0.8.0.

@chrmarti chrmarti closed this as completed Jan 4, 2019
@fiveisprime
Copy link
Member

Yes! This is absolutely fantastic! Thanks for getting this in 😄

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

No branches or pull requests

2 participants