From 0c304b0632db524356e940fc74dc6230e790d11d Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Tue, 17 Nov 2026 14:26:01 +0000 Subject: [PATCH] cli: list OAuth clients with all=true An admin key sees clients only with it, as on Tailscale. --- cmd/headscale/cli/oauth_client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/headscale/cli/oauth_client.go b/cmd/headscale/cli/oauth_client.go index 012af5fcf..369b9be38 100644 --- a/cmd/headscale/cli/oauth_client.go +++ b/cmd/headscale/cli/oauth_client.go @@ -103,7 +103,8 @@ var listOAuthClientsCmd = &cobra.Command{ } defer cancel() - resp, err := client.ListKeysWithResponse(ctx, oauthTailnet, nil) + // As on Tailscale, an admin key lists OAuth clients only with all=true. + resp, err := client.ListKeysWithResponse(ctx, oauthTailnet, &clientv2.ListKeysParams{All: new(true)}) if err != nil { return fmt.Errorf("listing oauth clients: %w", err) }