From e2f382c44dbd7a235aaa5640bfe924a627e36f16 Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Sun, 23 Feb 2025 18:09:53 +0000 Subject: [PATCH] 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". --- pkg/cmd/auth/logout/logout.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/auth/logout/logout.go b/pkg/cmd/auth/logout/logout.go index ef978ebac..04307b6ad 100644 --- a/pkg/cmd/auth/logout/logout.go +++ b/pkg/cmd/auth/logout/logout.go @@ -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 + 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 `), Example: heredoc.Doc(` # Select what host and account to log out of via a prompt