Put all web assets including plugin assets under a shared static/ route in the web interface that's declared as immutable and cacheable for 1 year. This allows all JavaScript bundles to be loaded from disk instead of having to check with the web server each time and significantly speeds up the web interface load time. It also fixes the public path issue when using the --dev-plugin option behind a proxy. To prevent collisions and stale data all assets now include a hash in the filename. This means the entrypoint is now dynamic and specified in a manifest.json file created from the web build. For plugins this means the filename attribute needs to be removed from webpack.config.js.
Clusterio Player Auth Plugin
Plugin authenticating logged in players to the web interface. Authentication is achieved by a simple challenge response mechanism where players have to log into one of the Factorio server in the cluster and open a dialog that presents a code, this code is input into the login form on the web interface which gives back a second code. Once the player enters the second code into the dialog in-game the web interface is authenticated.
Installation
Run the following commands in the folder Clusterio is installed to:
npm install @clusterio/plugin-player_auth
npx clusteriomaster plugin add @clusterio/plugin-player_auth
Substitute clusteriomaster with clusterioslave or clusterioctl if this a dedicate slave or ctl installation respectively.
Master Configuration
player_auth.code_length
Length in character of the generated challenge codes that need to be input between the web interface login form and the in-game Factorio login dialog.
Defaults to 6.
player_auth.code_timeout
Time in seconds the first code generated stays valid. The login must be completed in less than this time starting from when the login dialog is opened in-game.
Defaults to 120.