Skip to content

Commit

Permalink
fix(oauth2): pass through body (#9106)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
almeidx and kodiakhq[bot] committed Feb 17, 2023
1 parent 9156a28 commit 483cbb3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/core/src/api/oauth2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand All @@ -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',
},
Expand All @@ -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',
},
Expand Down

2 comments on commit 483cbb3

@vercel
Copy link

@vercel vercel bot commented on 483cbb3 Feb 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 483cbb3 Feb 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.