debug: log full token response body and callback query params
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Temporary diagnostic logging to determine what GHL includes in the token exchange response and the OAuth callback redirect URL when user_type is Company (Sub-account target app, agency-level install). Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
ffb27acc11
commit
f01138474d
@ -81,6 +81,7 @@ func (h *OAuthHandler) HandleCallback(w http.ResponseWriter, r *http.Request) {
|
||||
http.Error(w, "missing authorization code", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
slog.Info("ghl oauth callback query params", "params", r.URL.RawQuery)
|
||||
|
||||
ctx := r.Context()
|
||||
tokenResp, err := h.exchangeCode(ctx, code)
|
||||
@ -202,6 +203,6 @@ func (h *OAuthHandler) postToken(ctx context.Context, data url.Values) (*TokenRe
|
||||
if err := json.Unmarshal(body, &tokenResp); err != nil {
|
||||
return nil, fmt.Errorf("failed to parse token response: %w", err)
|
||||
}
|
||||
slog.Info("ghl token response fields", "location_id", tokenResp.LocationID, "company_id", tokenResp.CompanyID, "user_type", tokenResp.UserType)
|
||||
slog.Info("ghl token response fields", "location_id", tokenResp.LocationID, "company_id", tokenResp.CompanyID, "user_type", tokenResp.UserType, "raw_body", string(body))
|
||||
return &tokenResp, nil
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user