question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to open the default browser instead of asking the user to copy/paste the URL

See 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.

https://www.npmjs.com/package/opn

const opn = require('opn');
opn('https://aka.ms/devicelogin');

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
lostintangentcommented, Apr 4, 2017

+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.

0reactions
PaulieScanloncommented, Mar 6, 2019

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do some links STILL open with Edge after setting my default
1. Open Setting on Start Menu. · 2. Go to Apps> Default Apps. · 3. Scroll down and click Choose Default Apps by...
Read more >
How can I open certain links in Google Chrome, which is not ...
To do this: Click on the Apple menu and select System Preferences. Choose the General tab. Just over halfway down, there's a menu...
Read more >
Specific browser for specific links - windows - Super User
Right click the link and select "Copy Hyperlink". Now open the Browser of your choice and, paste in ...
Read more >
Make Chrome your default browser - Computer
Set Chrome as your default web browser · On your computer, click the Start menu Start menu . · Click Settings Settings ....
Read more >
How to disable Edge's new URL copy and paste feature
As of Edge version 87 for Windows or 88 for macOS, you'll find that by default trying to copy and paste a URL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found