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.

@azure/identity: app never exits when using InteractiveBrowserCredential

See original GitHub issue
  • Package Name: @azure/identity
  • Package Version: 2.0.4
  • Operating system: MacOS 12.3.1
  • nodejs
    • version: 16.14.0
  • browser
    • name/version:
  • typescript
    • version:
  • Is the bug related to documentation in

Describe the bug When authenticating using InteractiveBrowserCredential on MacOS and not using cached credentials, the app never exits. I suspect that the local server used to catch the auth callback is never closed. Using any other auth methods works without having the app stuck at the end.

From some testing with my colleagues, the problem seems to only occur on MacOS, though I did not get the chance to try it myself on Windows and Linux.

To Reproduce Steps to reproduce the behavior:

  1. Try to authenticate in a Node.js app with
  const browserCredential = new InteractiveBrowserCredential({
    redirectUri: `http://localhost:31337`,
    tenantId: "<your tenant>,
  });
  await browserCredential.getToken("profile")
  console.log("login success");
  1. After login is successful, app never exits.

Expected behavior The app exists properly after an interactive browser login.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sinediedcommented, Jul 6, 2022

Sorry for the lag @KarishmaGhiya, I just tested 2.0.5 and it perfectly fixes the issue, thanks! 👍

1reaction
KarishmaGhiyacommented, May 14, 2022

@sinedied Thank you for reporting. We were able to reproduce this issue on mac, but works fine on windows. We are investigating into this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python 3.x - Unable to connect to azure blob storage using ...
I run it, I browse to the url, fill in the code I am issued and subsequently the connection is successful and a...
Read more >
azure.identity.InteractiveBrowserCredential class
Opens a browser to interactively authenticate a user. <xref:azure.identity.get_token> opens a browser to a login URL provided by Azure Active Directory and ...
Read more >
azidentity - Go Packages
The Azure Identity module provides Azure Active Directory (Azure AD) token authentication support across the Azure SDK.
Read more >
Azure Identity 201 - DefaultAzureCredential Options
We wanted to make it brain-dead simple for you to authenticate your apps with Azure. Auth can be very hard to get right....
Read more >
Azure AD authentication troubleshooting: Known problems ...
If your device has a client application installed which starts at Windows sign in that interacts with an Azure AD application AND that ......
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