auth0 / go-auth0

Go SDK for the Auth0 Management API.
https://auth0.com
MIT License
135 stars 54 forks source link

Body being sent in get requests #358

Closed fernandes6502 closed 6 months ago

fernandes6502 commented 8 months ago

Checklist

Description

I am trying to Read a specific client by the ClientID in our go backend, it works when I try via postman but fail when I perform the same call in the go sdk. I enabled the debug log and saw that the Auth0 Client is sending "null" as body in the GET request and our Firewall policy is blocking it.

a0Client, err := q.mgmtAPIClient.Client.Read(ctx, clientID)

debug log:

\nGET /api/v2/clients/aaaaaaaa HTTP/1.1\r\nHost: my-domain.com\r\nUser-Agent: Go-Auth0/1.4.0\r\nContent-Length: 5\r\nAuth0-Client: HIDDEN\r\nContent-Type: application/json\r\nAccept-Encoding: gzip\r\n\r\nnull\n

Expectation

it should return the client

Reproduction

  1. Create a small go lang application that will try to fetch a client.
  2. use the Read method from the management SDK and activate the debug log.
  3. Within the debug log, it's possible to see the auth0 sending the "null" in the request even if it is a GET.

Auth0 Go SDK version

1.4.0

developerkunal commented 6 months ago

Hi @fernandes6502 ,

Great news! The issue has been fixed in version 1.5.0. Please take a moment to review, and feel free to reach out if you encounter any further issues.