Skip to content

Commit 97aaaa8

Browse files
authored
[Update] docs: update access token creation instructions (#1774)
## WHAT Improvements to token creation steps: * Moved the "Expiration" field step to later in the process and updated its description to clarify that users can select from predefined options or specify a custom expiration date, with an added note about the minimum date requirement. * Reordered and renumbered the steps for configuring allowed IP ranges, package/scope access, and organization access for better logical flow and clarity. ## WHERE Modified on: https://docs.npmjs.com/creating-and-viewing-access-tokens
1 parent d94a6d5 commit 97aaaa8

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

content/integrations/integrating-npm-with-external-services/creating-and-viewing-access-tokens.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You can [create](#creating-access-tokens) and [view](#viewing-access-tokens) acc
1414

1515
<Screenshot src="/integrations/integrating-npm-with-external-services/tokens-profile.png" alt="Screenshot of the account menu with the tokens link selected" />
1616

17-
2. Click **Generate New Token**, then click **Granular Access Token**.
17+
2. Click **Generate New Token**.
1818

1919
<Screenshot src="/integrations/integrating-npm-with-external-services/create-token.png" alt="Screenshot of the create new token button" />
2020

@@ -26,28 +26,30 @@ You can [create](#creating-access-tokens) and [view](#viewing-access-tokens) acc
2626
- This setting is unchecked (false) by default
2727
- By checking this box, the token will bypass 2FA for write actions even if 2FA is enabled at the account or package level
2828

29-
6. In the **Expiration** field, enter a token expiration period. The date must be at least 1 day in the future.
30-
31-
7. (Optional) In the **Allowed IP Ranges** field, enter IP address ranges to restrict your access token to. You must use [CIDR][cidr-wiki] notation to enter IP address ranges. To add more than one allowed IP range, click **Add IP Range** and enter an IP range in the new text field.
29+
6. (Optional) In the **Allowed IP Ranges** field, enter IP address ranges to restrict your access token to. You must use [CIDR][cidr-wiki] notation to enter IP address ranges. To add more than one allowed IP range, click **Add IP Range** and enter an IP range in the new text field.
3230

3331
<Screenshot src="/integrations/integrating-npm-with-external-services/granular-access-token-ip-range.png" alt="Screenshot of the allowed IP ranges section" />
3432

35-
8. (Optional) In the **Packages and scopes** section, configure your token's access to packages and scopes.
33+
7. (Optional) In the **Packages and scopes** section, configure your token's access to packages and scopes.
3634
- In the **Permissions** dropdown menu, select **No access**, **Read-only**, or **Read and write**.
3735
- Under **Select Packages**, select either:
3836
- **All Packages** to grant the token access to all packages the user account has access to.
3937
- **Only select packages and scopes** to choose up to 50 specific packages or scopes to give the token access to. Then select specific packages or scopes from the dropdown menu.
4038

4139
<Screenshot src="/integrations/integrating-npm-with-external-services/granular-access-token-packages-scopes.png" alt="Screenshot of the packages and scopes section" />
4240

43-
9. (Optional) In the **Organizations** section, configure your token's access to organizations.
41+
8. (Optional) In the **Organizations** section, configure your token's access to organizations.
4442
- In the **Permissions** dropdown menu, select **No access**, **Read-only**, or **Read and write**.
4543
- Under **Select organizations**, select the organizations you want to grant your token access to.
4644

4745
<Screenshot src="/integrations/integrating-npm-with-external-services/granular-access-token-organizations.png" alt="Screenshot of the organizations section" />
4846

4947
_**Note**: When you give a token access to an organization, the token can only be used for managing organization settings and teams or users associated with the organization. It does not give the token the right to publish packages managed by the organization._
5048

49+
9. In the **Expiration** field, select a token expiration period from the dropdown menu. You can choose from predefined options or select Custom to specify a custom expiration date using the date picker.
50+
51+
_**Note**: The date must be at least 1 day in the future._
52+
5153
10. Review the token summary, then click **Generate Token**.
5254

5355
<Screenshot src="/integrations/integrating-npm-with-external-services/granular-access-token-summary.png" alt="Screenshot of the granular access token summary and the generate token button" />
3.2 KB
Loading

0 commit comments

Comments
 (0)