fix(api): switch to URLSearchParams for OAuth device authorization body
All checks were successful
build-and-push / lint (push) Successful in 8s
build-and-push / sonar (push) Successful in 20s
build-and-push / docker (push) Successful in 11s

This commit is contained in:
nocci 2026-03-08 11:38:54 +00:00
parent 84e50f07f2
commit e494c1c04e

View file

@ -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',
}, },