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;
|
||||
|
||||
try {
|
||||
deviceResponse = await axios.post('https://account-public-service-prod.ol.epicgames.com/account/api/oauth/deviceAuthorization', {
|
||||
clientId: '34a02cf8f4414e29b159cdd02e6184bd',
|
||||
scope: 'account.basicprofile account.userentitlements',
|
||||
}, {
|
||||
const params = new URLSearchParams();
|
||||
params.append('clientId', '34a02cf8f4414e29b159cdd02e6184bd');
|
||||
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: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue