From fb97cbbbac07cd71502c0c033dc768bf9dc1e5fc Mon Sep 17 00:00:00 2001 From: Will Vedder Date: Fri, 2 Dec 2022 14:07:54 -0500 Subject: [PATCH] Adding loggins --- internal/cli/api.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/cli/api.go b/internal/cli/api.go index 2c4fa1564..6fb310ef4 100644 --- a/internal/cli/api.go +++ b/internal/cli/api.go @@ -131,11 +131,16 @@ func apiCmdRun(cli *cli, inputs *apiCmdInputs) func(cmd *cobra.Command, args []s } bearerToken := cli.config.Tenants[cli.tenant].AccessToken - if bearerToken == "" { return errors.New("missing access token associated with tenant. Please re-authenticate by running `auth0 login`") } + cli.renderer.Infof("%+v", cli.config.Tenants) + cli.renderer.Infof("====================") + cli.renderer.Infof("%+v", cli.tenant) + cli.renderer.Infof("====================") + cli.renderer.Infof("%+v", cli.config.Tenants[cli.tenant]) + request.Header.Set("Authorization", fmt.Sprintf("Bearer %s", bearerToken)) request.Header.Set("Content-Type", "application/json") request.Header.Set("User-Agent", fmt.Sprintf("%s/%s", userAgent, strings.TrimPrefix(buildinfo.Version, "v")))