fix(api): switch to URLSearchParams for OAuth device authorization body
This commit is contained in:
parent
84e50f07f2
commit
e494c1c04e
1 changed files with 5 additions and 4 deletions
|
|
@ -98,10 +98,11 @@ const getValidAuth = async ({ otpKey, reuseCookies, cookiesPath }) => {
|
||||||
let deviceResponse;
|
let deviceResponse;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
deviceResponse = await axios.post('https://account-public-service-prod.ol.epicgames.com/account/api/oauth/deviceAuthorization', {
|
const params = new URLSearchParams();
|
||||||
clientId: '34a02cf8f4414e29b159cdd02e6184bd',
|
params.append('clientId', '34a02cf8f4414e29b159cdd02e6184bd');
|
||||||
scope: 'account.basicprofile account.userentitlements',
|
params.append('scope', 'account.basicprofile account.userentitlements');
|
||||||
}, {
|
|
||||||
|
deviceResponse = await axios.post('https://account-public-service-prod.ol.epicgames.com/account/api/oauth/deviceAuthorization', params.toString(), {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue