Closed hlxid closed 4 years ago
Maybe we can use the same way I did it in the GUI, altough it is a bit hacky: https://github.com/codeoverflow-org/nodecg-io/blob/b7348e7da96ca24bdbc8505d261abf8793c79f3f/nodecg-io-core/dashboard/authentication.ts#L13-L17 If there is some cleaner way that is prefered, but at least it is better as a timeout which might fail if it is too short.
Description
During development the step of entering the password can get pretty annoying. In ChatOverflow we had an cli parameter that could be passed with a password which was used to automatically login. We should have a similar system, either with cli parameters or environment variables.
A problem is that the framework doesn't know when all services are loaded and the
PersistenceManager
requires that all services have registered them selfs. Either we use a timeout like one second after initial loading or we find a way to know when nodecg has finished loading all bundles.Obviously other bundles could get the password that is passed to the framework, but this is a feature for development only, same as the one in ChatOverflow.
References
CO cli login flag