Ability to open the default browser instead of asking the user to copy/paste the URLSee original GitHub issue
It would be an improvement if
opn is considered as a dependency for
ms-rest-azure package so that it could open the URL in default browser on executing
azure login from CLI, or upon
msRest.interactiveLogin() API call.
const opn = require('opn');
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
+1 to this. I’m using opn in a project to do exactly this, and it might be nice if the Azure SDK handled this (maybe it could be an opt-in option?).
I’m also parsing out the device code and copying it to the clipboard, which is another behavior that might make sense for the SDK to handle. That way, interactive logins are as simple as possible.
Hi @fiveisprime, shame this issue is closed. I also think this would be a great idea.
I understand the concerns about varying ways of using the SDK and browser support, but… does / could
interactiveLogin have a sort pre-call hook that contains the
//microsoft.com/devicelogin url and auth code … and if like me you want to do something with them you can but be default the cli just logs the instructions as it does now?
Anyone else got any ideas about how to open a browser and copy the code to make it less of a faff for the user?