ON PC
- I have set up node-red to run on an windows 10 PC.
- I use the "Manage Palette" tab to install node-red-node-google gadgets.
- I set up a Google API account to provide api credentials. I have only set up one project and asked for credentials for one api.
- I draw a node-red flow to send calendar events to debug window.
- I config the "google calendar out" node with the credentials supplied by google and add the callback recommended in node-red node to the google api list of "Authorised redirect URIs". The callback recommended by calendar out node is to localhost.
- I set up a google calendar and test to find debug window receives details of calendar start and stop events as expected.
ON ODROBIAN (DEBIAN)
- I then repeat process by installing node-red onto odroid-c1 running odrobian vanilla (a console based debian).
- I go through the same process.
- Google calendar configuration this time suggests a callback of node-red.example.com and recommends updating /etc/hosts with mapping of ip of odroid to node-red.example.com.
- The node-red.example.com callback is added to api callback uri on api account. The odroid ip is mapped to node-red.example.com in /etc/hosts as recommended.
- Odroid is rebooted, node-red fired up, attempt is made to "Authenticate with google" and the api Request Permission page is displayed.
- "Allow" is selected but a "node-red.example.com’s server DNS address could not be found." is displayed.
- Firewall settings were experimented with but nothing allows the Request Permission to complete.
So, following the same steps as for the PC sees the api permission fail at last step on the debian running on arm-v7 based odroid c1.
The callback uri is generated by the node-red-node-google configuration node so it is not immediately apparent that can be easily changed. Certainly, setting the callback to localhost, as in the PC version, appeared to be a preferred option but ifandonlyif it was actually easily configurable.
Short of breaking into the software to change the callback to localhost, are there any avenues to fix the DNS address missing problem?
Assuming you updated the /etc/hosts on the odroid and you are accessing the Node-RED UI from some other machine.
Adding an entry to the /etc/hosts file only changes how the odroid machine will resolve DNS addresses not how the machine you access the Node-RED UI resolves DNS addresses. This matters because the OAuth redirect will be handled by the machine accessing the UI not the odroid machine.
For this to work you need to edit the hosts file on your windows machine not the odroid.