fission-codes / auth-lobby

The authentication service that Fission services run.
https://auth.fission.codes
GNU Affero General Public License v3.0
12 stars 1 forks source link

Make boostrap peer list configurable via the config/*.json files #64

Closed matheus23 closed 3 years ago

matheus23 commented 3 years ago

Problem

At the moment the peers to connect to in the auth lobby shared worker are hard-coded for production and staging nodes here:

https://github.com/fission-suite/auth-lobby/blob/9234e66752946f74c618e9dd4a2b0fd095cf8199/src/Javascript/Worker.js#L105-L107

It would be great if they were configurable via the config/*.json files, too, so I can e.g. easily support connecting up my pizza instance/other people can configure their own fission constellation without code changes.

Solution

I'm not quite sure. I know that it's not as easy as with the other variables, as there's no html file for the worker for mustache to inject the variables into. Maybe we can do something with esbuild's --define parameters + some jq querying?