1NPM-ADDUSER(1)                                                  NPM-ADDUSER(1)
2
3
4

NAME

6       npm-adduser - Add a registry user account
7
8   Synopsis
9         npm adduser
10
11         aliases: login, add-user
12
13       Note: This command is unaware of workspaces.
14
15   Description
16       Create or verify a user named <username> in the specified registry, and
17       save the credentials to the .npmrc file. If no registry  is  specified,
18       the default registry will be used (see npm help config).
19
20       The username, password, and email are read in from prompts.
21
22       To reset your password, go to https://www.npmjs.com/forgot
23
24       To change your email address, go to https://www.npmjs.com/email-edit
25
26       You  may  use this command multiple times with the same user account to
27       authorize on a new machine.  When authenticating on a new machine,  the
28       username,  password and email address must all match with your existing
29       record.
30
31       npm login is an alias to adduser and behaves exactly the same way.
32
33   Configuration
34   registry
35       • Default: "https://registry.npmjs.org/"
36
37       • Type: URL
38
39
40       The base URL of the npm registry.
41
42   scope
43       • Default: the scope of the current project, if any, or ""
44
45       • Type: String
46
47
48       Associate an operation with a scope for a scoped registry.
49
50       Useful when logging in to or out of a private registry:
51
52         # log in, linking the scope to the custom registry
53         npm login --scope=@mycorp --registry=https://registry.mycorp.com
54
55         # log out, removing the link and the auth token
56         npm logout --scope=@mycorp
57
58       This will cause @mycorp to be mapped to the registry for future instal‐
59       lation of packages specified according to the pattern @mycorp/package.
60
61       This will also cause npm init to create a scoped package.
62
63         # accept all defaults, and create a package named "@foo/whatever",
64         # instead of just named "whatever"
65         npm init --scope=@foo --yes
66
67   auth-type
68       • Default: "legacy"
69
70       • Type: "legacy", "web", "sso", "saml", "oauth", or "webauthn"
71
72
73       NOTE:  auth-type  values "sso", "saml", "oauth", and "webauthn" will be
74       removed in a future version.
75
76       What authentication strategy to use with login.
77
78   See Also
79       • npm help registry
80
81       • npm help config
82
83       • npm help npmrc
84
85       • npm help owner
86
87       • npm help whoami
88
89       • npm help token
90
91       • npm help profile
92
93
94
95
96                                September 2022                  NPM-ADDUSER(1)
Impressum