From bceb642bcba33fd6a88a64ba2c73d0153be996a4 Mon Sep 17 00:00:00 2001 From: nocci Date: Sun, 8 Mar 2026 12:35:54 +0000 Subject: [PATCH] refactor(auth): remove quotes from object keys and trailing commas in device auth flow --- epic-claimer-new.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epic-claimer-new.js b/epic-claimer-new.js index 18a9686..8026819 100644 --- a/epic-claimer-new.js +++ b/epic-claimer-new.js @@ -54,7 +54,7 @@ const pollForTokens = async (deviceCode, maxAttempts = 30) => { const response = await axios.post('https://account-public-service-prod.ol.epicgames.com/account/api/oauth/token', params.toString(), { headers: { 'Content-Type': 'application/x-www-form-urlencoded', - 'Authorization': 'Basic OThmN2U0MmMyZTNhNGY4NmE3NGViNDNmYmI0MWVkMzk6MGEyNDQ5YTItMDEwYS00NTFlLWFmZWMtM2U4MTI5MDFjNGQ3', + Authorization: 'Basic OThmN2U0MmMyZTNhNGY4NmE3NGViNDNmYmI0MWVkMzk6MGEyNDQ5YTItMDEwYS00NTFlLWFmZWMtM2U4MTI5MDFjNGQ3', }, }); if (response.data?.access_token) { @@ -110,7 +110,7 @@ const getClientCredentialsToken = async () => { }; // Get device authorization code (second step of OAuth flow) -const getDeviceAuthorizationCode = async (clientCredentialsToken) => { +const getDeviceAuthorizationCode = async clientCredentialsToken => { try { const params = new URLSearchParams(); params.append('prompt', 'login'); @@ -126,7 +126,7 @@ const getDeviceAuthorizationCode = async (clientCredentialsToken) => { return { deviceCode: response.data.device_code, userCode: response.data.user_code, - verificationUriComplete: response.data.verification_uri_complete + verificationUriComplete: response.data.verification_uri_complete, }; } catch (error) { console.error('Failed to get device authorization code:', error.response?.status || error.message);