Token exchange body needs to be JSON
This commit is contained in:
parent
e470eb5c51
commit
874320ebe6
1 changed files with 12 additions and 12 deletions
|
|
@ -66,9 +66,9 @@ export async function handleOAuthCallback(serverUrl: string, code: string): Prom
|
||||||
const response = await fetch(metadata.token_endpoint, {
|
const response = await fetch(metadata.token_endpoint, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
body: new URLSearchParams({
|
body: JSON.stringify({
|
||||||
grant_type: 'authorization_code',
|
grant_type: 'authorization_code',
|
||||||
code,
|
code,
|
||||||
code_verifier: codeVerifier,
|
code_verifier: codeVerifier,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue