Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

load non-scoped auth configs, scoped to default registry #16

Merged
merged 3 commits into from
Apr 23, 2021

Conversation

isaacs
Copy link
Contributor

@isaacs isaacs commented Apr 23, 2021

References

@isaacs isaacs requested a review from a team as a code owner April 23, 2021 18:59
@isaacs isaacs force-pushed the isaacs/fix-top-level-auth-reading branch from 3c9ac9f to 2dcab91 Compare April 23, 2021 19:04
@isaacs isaacs changed the title Isaacs/fix top level auth reading include non-scoped auth configs at load, scoped to default registry Apr 23, 2021
@isaacs isaacs force-pushed the isaacs/fix-top-level-auth-reading branch from 2dcab91 to 6595c31 Compare April 23, 2021 19:05
@isaacs isaacs changed the title include non-scoped auth configs at load, scoped to default registry load non-scoped auth configs, scoped to default registry Apr 23, 2021
The legacy CouchDB style registries require an email in order to
authenticate.  However, the email itself is never used as part of the
auth process after the initial account creation.  There is no need for
it to be scoped to a given registry or required in order to use _auth
with a base64 encoded username/password basic auth pair.

Also, add support for a registry-scoped _auth field.  I'm not sure why
that was removed in the first place, since npm-registry-fetch will parse
it, so we need to be moving a top-level _auth field under the default
registry, for all the same reasons we do so for tokens.
Copy link
Contributor

@nlf nlf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good and should solve the problem of a top level _auth not being provided to the default registry

@isaacs
Copy link
Contributor Author

isaacs commented Apr 23, 2021

Related: npm/cli#3130

We don't actually use always-auth anymore.  There is no reason to manage
it as part of the registry-specific auth keys.

PR-URL: #16
Credit: @isaacs
Close: #16
Reviewed-by: @wraithgar, @nlf
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants