Skip to content

Commit

Permalink
Accept application/json for OAuth access token response (#164)
Browse files Browse the repository at this point in the history
* accept application/json for oauth token response

* changeset
  • Loading branch information
taranvohra authored May 23, 2023
1 parent 02ba00b commit 882996d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/great-spoons-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@gitbook/runtime': minor
---

Accept application/json by default for OAuth token response
1 change: 1 addition & 0 deletions packages/runtime/src/oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export function createOAuthHandler(
const response = await fetch(config.accessTokenURL, {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/x-www-form-urlencoded',
},
body: params.toString(),
Expand Down

0 comments on commit 882996d

Please sign in to comment.