diff --git a/docker-compose.yml b/docker-compose.yml index 50e099b..f8d797b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,3 +14,7 @@ services: environment: # - EMAIL=foo@bar.org # - NOTIFY='tgram://...' + - EG_MODE=new + +volumes: + fgc: diff --git a/epic-claimer-new.js b/epic-claimer-new.js index 2f3349d..a585721 100644 --- a/epic-claimer-new.js +++ b/epic-claimer-new.js @@ -47,10 +47,10 @@ const fetchFreeGamesAPI = async () => { const pollForTokens = async (deviceCode, maxAttempts = 30) => { for (let i = 0; i < maxAttempts; i++) { try { - const response = await axios.post('https://api.epicgames.dev/epic/oauth/token', { + const response = await axios.post('https://account-public-service-prod.ol.epicgames.com/account/api/oauth/token', { grant_type: 'urn:ietf:params:oauth:grant-type:device_code', device_code: deviceCode, - client_id: '34a02cf8f4414e29b159cdd02e6184bd', + client_id: '875a3b57d3a640a6b7f9b4e883463ab4', }); if (response.data?.access_token) { console.log('✅ OAuth successful'); @@ -99,7 +99,7 @@ const getValidAuth = async ({ otpKey, reuseCookies, cookiesPath }) => { try { const params = new URLSearchParams(); - params.append('clientId', '34a02cf8f4414e29b159cdd02e6184bd'); + params.append('clientId', '875a3b57d3a640a6b7f9b4e883463ab4'); 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(), { @@ -122,10 +122,10 @@ const getValidAuth = async ({ otpKey, reuseCookies, cookiesPath }) => { const totpCode = authenticator.generate(otpKey); console.log(`🔑 TOTP Code (generated): ${totpCode}`); try { - const refreshed = await axios.post('https://api.epicgames.dev/epic/oauth/token', { + const refreshed = await axios.post('https://account-public-service-prod.ol.epicgames.com/account/api/oauth/token', { grant_type: 'refresh_token', refresh_token: tokens.refresh_token, - code_verifier: totpCode, + client_id: '875a3b57d3a640a6b7f9b4e883463ab4', }); tokens.access_token = refreshed.data.access_token; } catch {