Skip to content

AzureAuth Is Not Properly Resolved #135

@aolszowka

Description

@aolszowka

Describe the bug
Consider an organization which has blocked access at the network level to the public NPMJS Feeds. If you work around this by installing ado-npm-auth from your local feed, ado-npm-auth still fails to work as expected in Windows because it appears to expect AzureAuth to be accessible from npm exec azureauth.

This can cause problems when ado-npm-auth was installed as a global tool (IE npm i -g ado-npm-auth).

This issue is most likely masked for most people because npm exec azureauth will silently pull azureauth from the public feed (if accessible).

Installing azureauth as a global tool as well (IE npm i -g azureauth) will work around this issue.

I suspect the fix needs to be made in https://github.com/microsoft/ado-npm-auth/blob/main/packages/ado-npm-auth-lib/src/azureauth/azureauth-command.ts to behave more like https://github.com/microsoft/ado-npm-auth/blob/main/packages/node-azureauth/src/azure-auth-command.ts and try to pull azureauth from the node_modules folder that gets pulled down with ado-npm-auth.

To Reproduce
Steps to reproduce the behavior:

  1. Block all access to the public NPM Feeds at a corporate level
  2. Have ado-npm-auth installed as a global tool
  3. Attempt to run ado-npm-auth
  4. Fail silently due to azureauth not being found and being unable to grab it from the public registries

Expected behavior
You should pull from the "local" node_modules that ship with ado-npm-auth

Desktop (please complete the following information):

  • OS: Windows 11

Additional context
Again the work around is to install it as a global tool which will get you past the first problem, but then you're right back to #69

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions