Skip to content

Commit ad4e9fa

Browse files
committed
fix: use body in callback instead of query params
1 parent da9d05f commit ad4e9fa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/Callback.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ async function fetchTokens(code: string) {
4242
code,
4343
redirect_uri: window.location.origin,
4444
})
45-
const resp = await fetch(`https://id.twitch.tv/oauth2/token?${params}`, { method: 'POST' })
45+
const resp = await fetch(`https://id.twitch.tv/oauth2/token?${params}`, {
46+
method: 'POST',
47+
body: params.toString(),
48+
})
4649
4750
const data = await resp.json()
4851
if ('message' in data) {

0 commit comments

Comments
 (0)