docs: document how to revoke gh OAuth tokens

This documents how to revoke OAuth tokens generated by `gh`. This also
adjusts some language to match the language used by GitHub.com:
"invalidate" is now "revoke".
This commit is contained in:
Kynan Ware 2025-02-23 18:09:53 +00:00
parent 537a22228c
commit e2f382c44d

View file

@ -39,7 +39,16 @@ func NewCmdLogout(f *cmdutil.Factory, runF func(*LogoutOptions) error) *cobra.Co
for an account. The authentication configuration is only
removed locally.
This command does not invalidate authentication tokens.
This command does not revoke authentication tokens.
To revoke authentication tokens generated by the GitHub CLI:
1. Visit <https://github.com/settings/applications>
2. Select the "GitHub CLI" application
3. Select "Revoke Access"
4. Select "I understand, revoke access"
For more information about revoking OAuth application tokens, see <https://docs.github.com/en/apps/oauth-apps/using-oauth-apps/reviewing-your-authorized-oauth-apps>
`),
Example: heredoc.Doc(`
# Select what host and account to log out of via a prompt