Many moons ago someone kindly submitted a short flow to zip a Node-RED instance and save it to Dropbox. This still works and I still use it. So, I thought that I would try and do the same for Google. The best contrib node I could find to save files to Google Drive was @ivanva/node-red-contrib-google-drive.
Now to the problem. As far as I can tell (I am getting on a bit so I may have messed up) I have entered everything as specified to create a Google OAuth 2.0 credential. One of the steps requires a Redirect URI and http://localhost:1880/google-credentials/auth/callback is suggested.
However, when I try and authorize the node everything seems to go OK (you are entering shark infested waters etc.) but at the last knockings I get a Can't reach this page - localhost refused to connect. So obviously localhost as a callback URI is not working.
Can anyone who is already using this node, or anyone who understands callback URIs, help me with what I should be using as a callback address.
The redirect URI needs to match how you're accessing Node-RED. If you open Node-RED in your browser using something other than localhost (like an IP address or hostname), use that same address in the callback URI.
Check the URL in your browser when you're running Node-RED. If it's something like http://192.168.1.100:1880 or http://myhostname:1880, use http://192.168.1.100:1880/google-credentials/auth/callback or http://myhostname:1880/google-credentials/auth/callback in both the Google OAuth config and the node settings.
If you need localhost to work but it's refusing, verify Node-RED is actually listening on 127.0.0.1 — check your settings.js for the uiHost setting.
Thank you for the reply,
Unfortunately Google OAuth does not allow URIs with 192.168.1.100:1880.
I run all my Node-RED instances headless via SSH so if I set uiHost to 127.0.0.1 will I still be able to access Node-RED from my PC? ( I tried using the hostname but my browser just comes back with cannot connect it only works using 192.168.1.100:1880)