Skip to content

Feature Request: host-level authenticationΒ #246

@bgotink

Description

@bgotink

One of the major reasons my org uses plugins in yarn berry is to centralise authentication.

We use separate NPM registries per domain within our org, all hosted on the same domain name. This has caused issues with yarn's metadata cache (yarnpkg/berry#6021) but it also makes authentication more complex.
We've therefore introduced a "universal-authentication" plugin that uses the getNpmAuthenticationHeader hook to look for a token in ~/.yarnrc.yml for a token for any registry on the same host as the currently configured registry.

We would love to do without this plugin. Would it be possible to support setting authentication settings on host level on top of the currently supported scope and registry settings? A possible alternative would be to support patterns in the npmRegistries configuration property keys: https://host.internal/repositories/*-npm

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