Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio committed Apr 28, 2023
1 parent 1ce55ca commit 96a6d9b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions auth/OpenAiAuth.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,11 +410,13 @@ func (auth *Authenticator) GetAccessToken() (string, Error) {
"redirect_uri": "https://labs.openai.com/auth/callback",
}
payload_json, _ := json.Marshal(payload)
println(string(payload_json))
// Construct request to https://auth0.openai.com/oauth/token
req, _ := http.NewRequest("POST", "https://auth0.openai.com/oauth/token", strings.NewReader(string(payload_json)))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("User-Agent", auth.UserAgent)
req.Header.Set("Accept", "application/json")
req.Header.Set("auth0-client", "eyJuYW1lIjoiYXV0aDAtc3BhLWpzIiwidmVyc2lvbiI6IjEuMjAuMSJ9")

resp, _ = auth.Session.Do(req)
defer resp.Body.Close()
Expand Down

0 comments on commit 96a6d9b

Please sign in to comment.