randomBrainstormer / MMM-GoogleCalendar

Google Calendar for MagicMirror²
MIT License
73 stars 45 forks source link

authentication is getting stuck #50

Closed 366Cobra closed 8 months ago

366Cobra commented 11 months ago

I have pasted the credentials.json into the folder and enabled the API. when i run 'node authorize.js', it gets stuck. no output, no timeout or anything. it is supposed to give me a URL to get a code, right? any idea?

nobbie25 commented 11 months ago

are you doing this from the UI or from command line via SSH. When you run node authorize you need to be on the UI of the rpi because it opens up the browser to make you click allow

battlehax commented 9 months ago

Any workaround for this? There is no pi in my setup and I'm running mm as a server in a tiny container.

nobbie25 commented 9 months ago

What OS are you running on your container? Does it have a UI? You should be able to access the UI of your container via vnc and open a web browser. I’ve got a bunch of containers running and I install a desktop for this reason.

battlehax commented 9 months ago

I'm running minimal Debian with no X as a magicmirror server that's accessed by several devices on my network.

366Cobra commented 9 months ago

are you doing this from the UI or from command line via SSH. When you run node authorize you need to be on the UI of the rpi because it opens up the browser to make you click allow

thanks for the reply. there is the issue. i use ssh to configure it, as it is fitted above our range hood in the kitchen. is there a way to get it done via ssh?

nobbie25 commented 9 months ago

I configure mine via SSH and CLI too as its mounted on a wall with no access to a mouse and keyboard but I knew that there would be the need to have access to the UI to fix and configure issues so I installed an X and a vnc client. I would highly recommend doing both if you haven't.. The only other workaround would be to either rewrite the authorize to follow OAuth a command line input verification or to try and manually authorize using this https://developers.google.com/identity/gsi/web/guides/devices

Disclaimer.. I haven't tried to manually authorize using these steps

randomBrainstormer commented 8 months ago

Hi, unfortunately this plugin doesn't support SSH authentication any longer. The latest updated module forces a browser to open in the Pi itself, hence you're unable to see it when connecting through SSH. As suggested by @nobbie25 , try using VNC or try connecting the keyboard/mouse directly to the pi