- Add Cloudflare bypass functionality using FlareSolverr service
- Configure FlareSolverr Docker service with environment options
- Add flaresolverr_url config option with default localhost fallback
- Replace manual Cloudflare challenge notification with automated solving attempt
- Create new cloudflare.js module with health check, challenge detection, and solution application
-removed axios dependency and replaced server-side API calls with in-page fetch() execution
-migrated from OAuth device flow to browser-based authentication using persistent context
-simplified claim flow by removing manual token exchange and cookie management
The OAuth device flow has been refactored to use the client credentials grant flow as the first step, followed by a proper device authorization request using the obtained client credentials token. This change modernizes the authentication flow to align with current Epic Games OAuth requirements and replaces the previous direct device authorization approach that used client_id and client_secret in the request body with the standardized authorization header pattern.
The changes replace old API endpoints with current Epic Games' Public Account Service URLs and update the client ID across all OAuth requests (device authorization, token exchange, and refresh). This resolves authentication failures caused by deprecated endpoints and credentials.
Replace legacy OAuth token endpoint with new Epic Games API endpoint,
and add required Content-Type header for device authorization request
to comply with updated API expectations.
- imports device auth utility functions
- adds logic to reuse Epic Games device authentication from legacy mode
- loads device auth cookies (EPIC_SSO_RM, EPIC_DEVICE, EPIC_SESSION_AP) when available
- falls back to regular authentication if device auth is not present
This enables seamless transition for users migrating from legacy authentication while maintaining backward compatibility.
The default value for `eg_mode` has been changed from 'new' back to 'legacy'. This reverts the previous commit (726b9bc) that changed the default, likely due to issues or instability with the new API-driven flow.
- standardize string literals to single quotes in constants.js
- remove unused variable and normalize whitespace in cookie.js
- simplify nullish coalescing expression in device-auths.js
This consistency improvement enhances code readability and enforces uniform style across the codebase.
Replace separate `docker buildx install` step with installing `docker-buildx` package directly via apk, streamlining the Docker Buildx setup in the CI workflow.
Replace multi-step Node.js and npm install with single Alpine package install,
and simplify Docker builder setup by switching from GitHub Action to direct
CLI installation via apk. Also enable network debugging tools for better
troubleshooting in the CI environment.
- replace legacy .eslintrc files with flat eslint.config.js
- consolidate eslint globals for improved code clarity
- enable prefer-const and no-unused-vars off in *.js for flexibility
- remove unused import statements and redundant eslint directives from epic-games.js and aliexpress.js
- standardize function parameter syntax to arrow with parentheses omitted where safe
- add comments marking unused but retained functions for reference
This commit refactors epic-games.js to use the GraphQL API instead of the legacy promotions endpoint for retrieving free games. Key architectural improvements include:
- Added modular authentication module (device-auths.ts) supporting persistent device auth tokens
- Introduces cookie management module (cookie.ts) for persistent session handling
- Extracts GraphQL query structures and API endpoints into constants.ts
- Implements multiple fallback strategies: device auth login, token exchange, and fallback to standard login
- Adds support for both GraphQL and promotions-based game discovery
- Streamlines claim process with improved tracking and error handling
- Removes legacy selectors and redundant logic
Additionally, updates package.json to include TypeScript and reorganizes dependency order for better maintainability.