* chore(l10n): add Chinese (Simplified Han script) translation chore(l10n): add Chinese (Traditional Han script) translation chore(l10n): add Chinese (Simplified Han script) translation chore(l10n): add Chinese (Traditional Han script) translation chore(l10n): update Chinese (Traditional Han script) translation chore(l10n): update Chinese (Simplified Han script) translation Co-authored-by: Weblate <noreply@weblate.org> Co-authored-by: phidias <phidias@aperx.org> Language: Chinese (Simplified Han script) Language: Chinese (Traditional Han script) Progress: 100.0% (493 of 493 strings) Translate-URL: https://translate.aperx.org/projects/expcluster/expdiscordauth/zh_Hans/ Translate-URL: https://translate.aperx.org/projects/expcluster/expdiscordauth/zh_Hant/ Translate-URL: https://translate.aperx.org/projects/expcluster/expscenario/zh_Hans/ Translate-URL: https://translate.aperx.org/projects/expcluster/expscenario/zh_Hant/ Translate-URL: https://translate.aperx.org/projects/expcluster/expserverlist/zh_Hans/ Translate-URL: https://translate.aperx.org/projects/expcluster/expserverlist/zh_Hant/ Translation: ExpCluster/ExpDiscordAuth Translation: ExpCluster/ExpScenario Translation: ExpCluster/ExpServerList * Rename zh_Hans.cfg to zh-CN.cfg * Rename zh_Hant.cfg to zh-TW.cfg * Rename zh_Hant.cfg to zh-TW.cfg * Rename zh_Hans.cfg to zh-CN.cfg --------- Co-authored-by: Weblate <noreply@weblate.org> Co-authored-by: phidias <phidias@aperx.org>
ExpGaming - Discord Auth
Lets players log in to the web interface with Discord, and links their Factorio accounts to a Discord account. It only uses the OAuth2 identify scope, so no bot is needed.
Setup
- Create an application in the Discord developer portal.
- Under OAuth2, copy the Client ID and reset the Client Secret to get one.
- Under OAuth2 → Redirects, add
<controller.public_url>api/exp_discord_auth/callback. For a controller withcontroller.public_urlset tohttps://example.com/cluster/that ishttps://example.com/cluster/api/exp_discord_auth/callback. It must match exactly, including the trailing path and http or https. - Set the config on the controller:
npx clusterioctl controller config set controller.public_url https://example.com/cluster/
npx clusterioctl controller config set exp_discord_auth.client_id <client id>
npx clusterioctl controller config set exp_discord_auth.client_secret <client secret>
controller.public_url has to be set, because the redirect URL is built from it and Discord rejects any URL that isn't registered.
Config
All fields are on the controller.
| Field | Default | Description |
|---|---|---|
exp_discord_auth.client_id |
Application ID of the Discord application. | |
exp_discord_auth.client_secret |
OAuth2 client secret of the Discord application. Only readable on the controller. | |
exp_discord_auth.max_accounts |
3 | How many Factorio accounts one Discord account can link. |
Linking
There are two ways to link a Factorio account:
- On the user page, a logged in user clicks Link Discord and approves it on Discord.
- On the login page, a player logs in with Discord and gets a code, then types
/link-discord CODEon any server. This is how a player who can't log in to the web interface yet links their account.
Linking a Factorio account that is already linked to another Discord account moves it. /link-discord without a code shows the current link, and /unlink-discord removes it. The user page has an Unlink button too.
Users can always see and remove their own link. The exp_discord_auth.link.get and exp_discord_auth.link.delete permissions allow it for other users.
Once linked, the Discord tab on the login page has a "Log in as" button for each linked account. Banned users can't log in this way.
Links are stored in database/exp_discord_auth/accounts.json on the controller.