From 4d45c0a461a2e20628ca38a50dab1dac2f0468a4 Mon Sep 17 00:00:00 2001 From: ramya18101 Date: Wed, 2 Sep 2026 18:19:44 +0530 Subject: [PATCH] fix: allow shell completion command without authentication --- internal/cli/root.go | 1 + internal/cli/root_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/cli/root.go b/internal/cli/root.go index 61fe62ab2..9e472aac6 100644 --- a/internal/cli/root.go +++ b/internal/cli/root.go @@ -166,6 +166,7 @@ func buildRootCmd(cli *cli) *cobra.Command { func commandRequiresAuthentication(invokedCommandName string) bool { commandsWithNoAuthRequired := []string{ + "auth0 " + cobra.ShellCompRequestCmd, "auth0 commands", "auth0 completion", "auth0 help", diff --git a/internal/cli/root_test.go b/internal/cli/root_test.go index 21c045007..f2a6f54f7 100644 --- a/internal/cli/root_test.go +++ b/internal/cli/root_test.go @@ -38,6 +38,7 @@ func TestCommandRequiresAuthentication(t *testing.T) { {"auth0 apps list", true}, {"auth0 apps create", true}, {"auth0 orgs members list", true}, + {"auth0 __complete", false}, {"auth0 completion", false}, {"auth0 help", false}, {"auth0 login", false},