Howdy – we have added Uppy to our react application and it works well with Drag and Drop and the base non-companion functionality. We have tried adding the Google drive connector, and running companion in a multitude of ways as a standalone or express server in a node js script. We have configured the secret value and the requests make it to companion, but the uppy-auth-token is always unset unless we explicitly pass the header.
Nothing gets set in local storage or the cookies, and it is a complete mystery after many days of debugging this, reading through all support threads new and old, and re-reading the docs a hundred times. One engineer thinks this has uppy-auth-token value should have something to do with our own JWT token, because of the jsonwebtoken library under the hood. I don’t think so, but we both agree that some value, possibly with Bearer in front, should get encrypted using the secret, but doing so from our CRA (create react app) framework feels quite mysterious, even if we know what value we were supposed to be encrypting, the crypto library won’t be available in the user’s browser.
One time an Engineer on my time had in their local storage a value companion-GoogleDrive-auth-token which seems to correspond to a bit in the companion code companion-${this.pluginId}-auth-token – but we haven’t been able to replicate getting this value set in localstorage with any kind of consistency – in fact it seems more like an anomaly that we have ever seen that value, given on average its always missing.
Any advice at all on what headers we need to supply to work with Companion would be much appreciated, and the docs mention a secret but don’t talk at all about the uppy-auth-token or how it is used.