diff --git a/Dockerfile b/Dockerfile
index ebad9eb..5d8ee90 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -77,4 +77,4 @@ ENV SHOW 1
# Script to setup display server & VNC is always executed.
ENTRYPOINT ["docker-entrypoint.sh"]
# Default command to run. This is replaced by appending own command, e.g. `docker run ... node prime-gaming` to only run this script.
-CMD node epic-games; node prime-gaming; node gog
+CMD node epic-games; node prime-gaming; node gog; node xbox;
diff --git a/README.md b/README.md
index 047d0ce..3938546 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ Claims free games periodically on
-
[Epic Games Store](https://www.epicgames.com/store/free-games)
-
[Amazon Prime Gaming](https://gaming.amazon.com)
-
[GOG](https://www.gog.com)
--
[Xbox Live Games with Gold](https://www.xbox.com/en-US/live/gold#gameswithgold) - planned
+-
[Xbox Live Games with Gold](https://www.xbox.com/en-US/live/gold#gameswithgold) ([experimental](https://github.com/vogler/free-games-claimer/issues/19))
-
[Unreal Engine (Assets)](https://www.unrealengine.com/marketplace/en-US/assets?count=20&sortBy=effectiveDate&sortDir=DESC&start=0&tag=4910) ([experimental](https://github.com/vogler/free-games-claimer/issues/44), same login as Epic Games)
Pull requests welcome :)
@@ -24,7 +24,7 @@ Easy option: [install Docker](https://docs.docker.com/get-docker/) (or [podman](
```
docker run --rm -it -p 6080:6080 -v fgc:/fgc/data --pull=always ghcr.io/vogler/free-games-claimer
```
-This will run `node epic-games; node prime-gaming; node gog` - if you only want to claim games for one of the stores, you can override the default command by appending e.g. `node epic-games` at the end of the `docker run` command, or if you want several `bash -c "node epic-games.js; node gog.js"`.
+This will run `node epic-games; node prime-gaming; node gog; node xbox;` - if you only want to claim games for one of the stores, you can override the default command by appending e.g. `node epic-games` at the end of the `docker run` command, or if you want several `bash -c "node epic-games.js; node gog.js"`.
Data (including json files with claimed games, codes to redeem, screenshots) is stored in the Docker volume `fgc`.
@@ -86,6 +86,9 @@ Available options/variables and their default values:
| GOG_EMAIL | | GOG email for login. Overrides EMAIL. |
| GOG_PASSWORD | | GOG password for login. Overrides PASSWORD. |
| GOG_NEWSLETTER | 0 | Do not unsubscribe from newsletter after claiming a game if 1. |
+| XBOX_EMAIL | | Xbox email for login. Overrides EMAIL. |
+| XBOX_PASSWORD | | Xbox password for login. Overrides PASSWORD. |
+| XBOX_OTPKEY | | Xbox MFA OTP key. |
See `config.js` for all options.
@@ -113,6 +116,7 @@ To get the OTP key, it is easiest to follow the store's guide for adding an auth
- **Epic Games**: visit [password & security](https://www.epicgames.com/account/password), enable 'third-party authenticator app', copy the 'Manual Entry Key' and use it to set `EG_OTPKEY`.
- **Prime Gaming**: visit Amazon 'Your Account › Login & security', 2-step verification › Manage › Add new app › Can't scan the barcode, copy the bold key and use it to set `PG_OTPKEY`
- **GOG**: only offers OTP via email
+- **Xbox**: visit [additional security](https://account.live.com/proofs/manage/additional) > Add a new way to sign in or verify > Use an app > Set up a different Authenticator app > I can't scan the bar code > copy the bold key and use it to set `XBOX_OTPKEY`
Beware that storing passwords and OTP keys as clear text may be a security risk. Use a unique/generated password! TODO: maybe at least offer to base64 encode for storage.
@@ -130,13 +134,16 @@ Claiming the Amazon Games works out-of-the-box, however, for games on external s
Keys and URLs are printed to the console, included in notifications and saved in `data/prime-gaming.json`. A screenshot of the page with the key is also saved to `data/screenshots`.
[TODO](https://github.com/vogler/free-games-claimer/issues/5): ~~redeem keys on external stores.~~
+### Xbox Games With Gold
+Run `node xbox` (locally or in docker).
+
### Run periodically
#### How often?
Epic Games usually has two free games *every week*, before Christmas every day.
Prime Gaming has new games *every month* or more often during Prime days.
-GOG usually has one new game every couples of weeks.
+GOG usually has one new game every couples of weeks. Xbox usually has two games *every month*.
-It is save to run the scripts every day.
+It is safe to run the scripts every day.
#### How to schedule?
The container/scripts will claim currently available games and then exit.