Commit graph

748 commits

Author SHA1 Message Date
root
48c861b3de fix: Multiple bug fixes and code cleanup
All checks were successful
build-and-push / lint (push) Successful in 8s
build-and-push / sonar (push) Successful in 21s
build-and-push / docker (push) Successful in 25s
- package.json: Add missing @eslint/js and globals devDependencies
- docker-entrypoint.sh: Fix X11 lock file name (.X1-lock → .X11-lock)
- epic-claimer-new.js: Use imported solveCloudflare/isCloudflareChallenge instead of duplicate implementations
- src/cloudflare.js: Fix solveCloudflare to use cfg.flaresolverr_url, remove unused imports
- epic-games.js: Remove unused code (getFreeGamesFromGraphQL, exchangeTokenForCookies, FREE_GAMES_QUERY, deviceAuthLoginSuccess variable)
- Run eslint --fix to clean up trailing spaces
2026-03-08 13:58:57 +00:00
nocci
b14530537a refactor(config): add network configuration and dependencies for inter-service communication
Some checks failed
build-and-push / lint (push) Failing after 8s
build-and-push / sonar (push) Has been skipped
build-and-push / docker (push) Has been skipped
- Configure flaresolverr and free-games-claimer to use a shared bridge network
- Explicitly set container name for flaresolverr and declare network dependency
- Define custom bridge network `fgc-network` for isolating service communication

This ensures services can reliably communicate over Docker's internal DNS while maintaining network separation from other containers.
2026-03-08 13:22:01 +00:00
nocci
e0c97f8d7c feat[cloudflare]: integrate FlareSolverr for automated Cloudflare challenge resolution
- 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
2026-03-08 13:06:46 +00:00
nocci
1ddcf1d8af refactor(epic): switch from external API calls to in-page browser-based fetching
All checks were successful
build-and-push / lint (push) Successful in 10s
build-and-push / sonar (push) Successful in 20s
build-and-push / docker (push) Successful in 11s
-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
2026-03-08 12:54:25 +00:00
nocci
bceb642bcb refactor(auth): remove quotes from object keys and trailing commas in device auth flow
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
2026-03-08 12:35:54 +00:00
nocci
52bd469976 refactor(auth): replace client credentials with Basic auth and normalize response fields
Some checks failed
build-and-push / lint (push) Failing after 7s
build-and-push / sonar (push) Has been skipped
build-and-push / docker (push) Has been skipped
2026-03-08 12:32:49 +00:00
nocci
d4acc813bc refactor(api): restructure Epic Games OAuth flow with new client credentials step
Some checks failed
build-and-push / lint (push) Failing after 8s
build-and-push / sonar (push) Has been skipped
build-and-push / docker (push) Has been skipped
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.
2026-03-08 12:23:52 +00:00
nocci
e8c28db63d feat(auth): add client_secret to Epic Games OAuth requests
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
2026-03-08 11:57:30 +00:00
nocci
1455963346 fix(api): update Epic Games OAuth endpoints and client ID
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
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.
2026-03-08 11:52:54 +00:00
nocci
e494c1c04e 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
2026-03-08 11:38:54 +00:00
nocci
84e50f07f2 fix(api): update Epic Games OAuth endpoint and add missing Content-Type header
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
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.
2026-03-08 11:35:07 +00:00
nocci
1cf4c86646 fix(api): update Epic Games OAuth endpoints and response field names
All checks were successful
build-and-push / lint (push) Successful in 7s
build-and-push / sonar (push) Successful in 20s
build-and-push / docker (push) Successful in 11s
Update OAuth endpoints to new public service URLs and adapt to camelCase
response fields in device authorization response.
2026-03-08 11:30:08 +00:00
nocci
4e95f50bc4 refactor(config): uncomment command for epic-games service
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 7s
2026-03-08 11:22:56 +00:00
nocci
0a5f40341b refactor(auth): add device auth reuse for legacy account migration
All checks were successful
build-and-push / lint (push) Successful in 8s
build-and-push / sonar (push) Successful in 21s
build-and-push / docker (push) Successful in 11s
- 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.
2026-03-08 11:18:28 +00:00
nocci
d55706c5f3 refactor(config): revert default eg_mode back to 'legacy'
All checks were successful
build-and-push / lint (push) Successful in 11s
build-and-push / sonar (push) Successful in 20s
build-and-push / docker (push) Successful in 8s
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.
2026-03-08 11:11:38 +00:00
nocci
726b9bcbd8 refactor(config): change default eg_mode from 'legacy' to 'new'
All checks were successful
build-and-push / lint (push) Successful in 7s
build-and-push / sonar (push) Successful in 20s
build-and-push / docker (push) Successful in 11s
2026-03-08 11:07:39 +00:00
nocci
99f5432e32 build(deps): add tough-cookie dependency
All checks were successful
build-and-push / lint (push) Successful in 8s
build-and-push / sonar (push) Successful in 21s
build-and-push / docker (push) Successful in 25s
iff
2026-03-08 10:59:57 +00:00
nocci
c0d148dc8e refactor(style): align template literals and whitespace formatting
All checks were successful
build-and-push / lint (push) Successful in 7s
build-and-push / sonar (push) Successful in 20s
build-and-push / docker (push) Successful in 19s
- 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.
2026-03-08 10:57:28 +00:00
nocci
22c84a759b refactor: migrate from TypeScript to JavaScript for auth modules
Some checks failed
build-and-push / lint (push) Failing after 11s
build-and-push / sonar (push) Has been skipped
build-and-push / docker (push) Has been skipped
2026-03-08 10:55:46 +00:00
nocci
b72bb3fa4c fix: use JavaScript imports for TypeScript files
All checks were successful
build-and-push / lint (push) Successful in 8s
build-and-push / sonar (push) Successful in 21s
build-and-push / docker (push) Successful in 8s
2026-03-07 14:54:36 +00:00
nocci
d47bfd7e8e fix: import constants.ts instead of constants.js
All checks were successful
build-and-push / lint (push) Successful in 8s
build-and-push / sonar (push) Successful in 22s
build-and-push / docker (push) Successful in 11s
2026-03-07 14:51:51 +00:00
nocci
29e17fa057 fix: use separate locators with OR for captcha detection
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 8s
2026-03-07 14:37:00 +00:00
nocci
cc2f370eee fix: remove unnecessary parentheses around expressions
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
2026-03-07 14:33:48 +00:00
nocci
3f241bf400 fix: use separate locators with OR for captcha detection
Some checks failed
build-and-push / lint (push) Failing after 8s
build-and-push / sonar (push) Has been skipped
build-and-push / docker (push) Has been skipped
2026-03-07 14:31:27 +00:00
nocci
6615cf02db fix: use :is() for OR condition in Playwright selector
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
2026-03-07 14:24:41 +00:00
nocci
6194e3eff3 fix: correct Playwright selector syntax for OR condition
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 12s
2026-03-07 14:19:36 +00:00
nocci
6ec9157a42 fix: add curl to apk add in docker buildx setup
All checks were successful
build-and-push / sonar (push) Successful in 20s
build-and-push / lint (push) Successful in 7s
build-and-push / docker (push) Successful in 1m10s
2026-03-07 14:10:25 +00:00
nocci
618106c2f7 fix: manually install docker buildx plugin
Some checks failed
build-and-push / sonar (push) Successful in 20s
build-and-push / docker (push) Failing after 6s
build-and-push / lint (push) Successful in 8s
2026-03-07 14:09:05 +00:00
nocci
ea627ab703 ci(workflow): simplify docker buildx installation
Some checks failed
build-and-push / docker (push) Failing after 6s
build-and-push / lint (push) Successful in 8s
build-and-push / sonar (push) Successful in 20s
Replace separate `docker buildx install` step with installing `docker-buildx` package directly via apk, streamlining the Docker Buildx setup in the CI workflow.
2026-03-07 14:07:31 +00:00
nocci
74d2e92b8d fix: install docker buildx plugin
Some checks failed
build-and-push / docker (push) Failing after 6s
build-and-push / lint (push) Successful in 7s
build-and-push / sonar (push) Successful in 21s
2026-03-07 14:03:59 +00:00
nocci
eb033ee4b9 fix: add git installation to docker job
Some checks failed
build-and-push / lint (push) Successful in 7s
build-and-push / sonar (push) Successful in 21s
build-and-push / docker (push) Failing after 6s
2026-03-07 14:02:18 +00:00
nocci
9c77d64d0f fix: use 127.0.0.1 instead of server in network debugging
Some checks failed
build-and-push / lint (push) Successful in 8s
build-and-push / sonar (push) Successful in 20s
build-and-push / docker (push) Failing after 4s
2026-03-07 14:00:17 +00:00
nocci
64b7d0786c fix: add debug output for SonarQube URL
Some checks failed
build-and-push / lint (push) Successful in 7s
build-and-push / sonar (push) Successful in 21s
build-and-push / docker (push) Failing after 9s
2026-03-07 13:33:17 +00:00
nocci
89d8b108cd fix: download and install sonar-scanner
Some checks failed
build-and-push / sonar (push) Failing after 6s
build-and-push / docker (push) Has been skipped
build-and-push / lint (push) Successful in 11s
2026-03-07 13:31:36 +00:00
nocci
555f62d72b fix: use correct sonar-scanner path
Some checks failed
build-and-push / lint (push) Successful in 8s
build-and-push / sonar (push) Failing after 4s
build-and-push / docker (push) Has been skipped
2026-03-07 13:30:54 +00:00
nocci
c4e049fe8c fix: add unzip and debug sonar-scanner installation
Some checks failed
build-and-push / sonar (push) Failing after 5s
build-and-push / docker (push) Has been skipped
build-and-push / lint (push) Successful in 7s
2026-03-07 13:29:39 +00:00
nocci
43405dfce3 fix: use manual SonarQube scanner installation
Some checks failed
build-and-push / lint (push) Successful in 7s
build-and-push / sonar (push) Failing after 5s
build-and-push / docker (push) Has been skipped
2026-03-07 13:28:35 +00:00
nocci
1abd90e256 fix: add Java runtime for SonarQube scanner
Some checks failed
build-and-push / lint (push) Successful in 8s
build-and-push / sonar (push) Failing after 8s
build-and-push / docker (push) Has been skipped
2026-03-07 13:26:54 +00:00
nocci
92f577c70b fix: use github.* variables instead of GITEA_*
Some checks failed
build-and-push / lint (push) Successful in 8s
build-and-push / sonar (push) Failing after 7s
build-and-push / docker (push) Has been skipped
2026-03-07 13:25:36 +00:00
nocci
5969c096bc fix: correct YAML indentation in workflow
Some checks failed
build-and-push / lint (push) Failing after 2s
build-and-push / sonar (push) Has been skipped
build-and-push / docker (push) Has been skipped
2026-03-07 13:24:13 +00:00
nocci
ec3fbbcfa6 fix: correct YAML indentation in workflow 2026-03-07 13:22:06 +00:00
nocci
78f9371831 fix: correct YAML indentation in workflow 2026-03-07 13:20:55 +00:00
nocci
fae3ee2c24 fix: correct YAML indentation in workflow 2026-03-07 13:19:53 +00:00
nocci
40235d62a8 chore(ci): remove outdated Forgejo workflow file 2026-03-07 13:18:43 +00:00
nocci
41425681e2 fix: move workflow to correct directory 2026-03-07 13:18:25 +00:00
nocci
5814f5a5d5 ci(workflow): add comment to build workflow 2026-03-07 13:15:04 +00:00
nocci
b85c326211 chore(config): update ESLint environment to support browser globals
Added `browser: true` environment and declared `window` and `navigator` as
readonly globals to support epic-games.js which uses browser APIs.
2026-03-07 12:49:45 +00:00
nocci
ddb37b5c82 ci(workflow): simplify Node.js installation and optimize Docker steps
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.
2026-03-07 12:45:30 +00:00
nocci
09d854ffb1 Fix Forgejo workflow: use GITEA_* variables instead of github.* 2026-03-06 15:43:55 +00:00
nocci
96df8cb3d4 refactor: migrate ESLint configuration to flat config and remove redundant rule files
- 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
2026-03-06 15:38:58 +00:00