fix(oauth2): pass through body (#9106)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Almeida
2023-02-17 20:18:13 +00:00
committed by GitHub
parent 9156a2889c
commit 483cbb3b2a

View File

@@ -39,6 +39,7 @@ export class OAuth2API {
public async tokenExchange(options: RESTPostOAuth2AccessTokenURLEncodedData) {
return this.rest.post(Routes.oauth2TokenExchange(), {
body: makeURLSearchParams(options),
passThroughBody: true,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
@@ -54,6 +55,7 @@ export class OAuth2API {
public async refreshToken(options: RESTPostOAuth2RefreshTokenURLEncodedData) {
return this.rest.post(Routes.oauth2TokenExchange(), {
body: makeURLSearchParams(options),
passThroughBody: true,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
@@ -71,6 +73,7 @@ export class OAuth2API {
public async getToken(options: RESTPostOAuth2ClientCredentialsURLEncodedData) {
return this.rest.post(Routes.oauth2TokenExchange(), {
body: makeURLSearchParams(options),
passThroughBody: true,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},