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

NAME

6       npm-logout - Log out of the registry
7
8   Synopsis
9         npm logout
10
11       Note: This command is unaware of workspaces.
12
13   Description
14       When  logged  into a registry that supports token-based authentication,
15       tell the server to end this token's session. This will  invalidate  the
16       token everywhere you're using it, not just for the current environment.
17
18       When  logged into a legacy registry that uses username and password au‐
19       thentication, this will clear the credentials in your  user  configura‐
20       tion.  In this case, it will only affect the current environment.
21
22       If --scope is provided, this will find the credentials for the registry
23       connected to that scope, if set.
24
25   Configuration
26   registry
27       • Default: "https://registry.npmjs.org/"
28
29       • Type: URL
30
31
32       The base URL of the npm registry.
33
34   scope
35       • Default: the scope of the current project, if any, or ""
36
37       • Type: String
38
39
40       Associate an operation with a scope for a scoped registry.
41
42       Useful when logging in to or out of a private registry:
43
44         # log in, linking the scope to the custom registry
45         npm login --scope=@mycorp --registry=https://registry.mycorp.com
46
47         # log out, removing the link and the auth token
48         npm logout --scope=@mycorp
49
50       This will cause @mycorp to be mapped to the registry for future instal‐
51       lation of packages specified according to the pattern @mycorp/package.
52
53       This will also cause npm init to create a scoped package.
54
55         # accept all defaults, and create a package named "@foo/whatever",
56         # instead of just named "whatever"
57         npm init --scope=@foo --yes
58
59   See Also
60       • npm help adduser
61
62       • npm help registry
63
64       • npm help config
65
66       • npm help whoami
67
68
69
70
71                                September 2022                   NPM-LOGOUT(1)
Impressum