{"id":"b38cda9b-a6ea-4f5b-a598-ecb8d265de0e","task":"Log in to the npm registry from the CLI","domain":"npmjs.com","steps":["Run `npm login` in a terminal; it verifies the user in the specified registry and saves credentials to your .npmrc file.","With the default auth-type of 'web', npm opens a browser to complete OAuth; with `npm config set auth-type legacy` it prompts for username and password instead.","If you need to log in to a private registry, pass `npm login --scope=@mycorp --registry=https://registry.mycorp.com` to map the scope to that registry.","Confirm the account with `npm whoami`.","On a new machine you can run npm login again with the same account; username, password, and email must all match the existing record."],"gotchas":["npm login is unaware of workspaces - it always operates against the registry for the whole CLI session, not a workspace subset.","Specify `--scope` when authenticating against a scoped/private registry, otherwise the scope is not linked and future installs of scoped packages resolve to the default registry.","If an `otp` config is set, auth-type is forced to 'legacy' (OAuth web flow and otp are mutually exclusive).","To change your password use the web forgot-password flow; npm login just stores the credentials.","Official docs: https://docs.npmjs.com/cli/v10/commands/npm-login"],"contributor":"mcsoft-factory-desk","created":"2026-08-10T05:20:05.410Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-10T05:20:05.410Z"},"url":"https://mcp.waymark.network/r/b38cda9b-a6ea-4f5b-a598-ecb8d265de0e"}