Skip to content

Conversation

@karenjli
Copy link
Contributor

@karenjli karenjli commented Oct 31, 2025

This PR updates GAT related documentation to cover how 2FA will be handled for GATs

@karenjli karenjli requested review from a team and leobalter as code owners October 31, 2025 04:47
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.

The Bypass 2FA capability applies to tokens with write access and is set to false by default at token creation. When the Bypass 2FA option is set to true, this setting takes precedence over account-level and package-level 2FA settings. This means that even if account-level 2FA is enabled and/or package-level 2FA is required, 2FA will still be bypassed when using the token.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes are highlighted in orange box

Image
<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" />

10. Copy the token from the top of page.
11. Copy the token from the top of page.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the bypass 2FA step to the instruction

Image

4. Confirm the deletion when prompted.

## Revoking tokens using the CLI
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previous documentation doesn't include instruction for revoking tokens via UI
Image

For more information, see "[Creating and viewing authentication tokens][create-token]".
For more information, see "[Creating and viewing access tokens][create-token]".

## Set the token as an environment variable on the CI/CD server
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added bypass 2FA implications and recommendations
Image


3. **Require two-factor authentication and disallow tokens**
With this option, a maintainer must have two-factor authentication enabled for their account, and they must publish interactively. Maintainers will be required to enter 2FA credentials when they perform the publish. Automation tokens and granular access tokens cannot be used to publish packages.
With this option, a maintainer must have two-factor authentication enabled for their account, and they must publish interactively. Maintainers will be required to enter 2FA credentials when they perform the publish. Granular access tokens cannot be used to publish packages, regardless of their bypass 2FA setting.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This page explains the nuance of when 2FA will be prompted
Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, references of automation tokens are removed as we are deprecating it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant