alangrainger / obsidian-google-photos

Connect to Google Photos from Obsidian
GNU General Public License v3.0
93 stars 5 forks source link

Cannot authenticate on Linux #20

Closed fbreitwieser closed 11 months ago

fbreitwieser commented 1 year ago

Hi, thanks a lot for this great plugin! Looking forward to using it.

I'm currently stuck trying to authenticate. I'm on Linux with Obsidian v1.4 and tried with both Wayland and Xorg.

When I try to authenticate, the window opens asking me to choose an account, and then to give access to view the library.

However, when I click 'Approve', the window title changes to 'Approved Clicked', the content turns blank, and the popup window stays open. When I manually close it, I get a message 'Authenthication Failed'.

Can you help with this?

fbreitwieser commented 1 year ago

I just checked with the 'Google Calendar' plugin where I manage to authenticate. There, the login window doesn't open in a Obsidian browser window, but rather my standalone browser (Chromium in that case). Once finished, the browser displays 'Authentication successful! Please return to obsidian.' (URL there is http://127.0.0.1:42813/callback...)

alangrainger commented 1 year ago

I just checked with the 'Google Calendar' plugin where I manage to authenticate.

Excellent discovery! I will copy what they're doing there.

In the meantime (since that won't be today) do you have access to a Mac or Windows machine just for setting this up? All you need is to copy across the plugin's data.json file to your normal vault:

{
  "clientId": "",
  "clientSecret": "",
  "accessToken": ""
}

If you don't have access to a physical machine you could consider installing one in VirtualBox? Otherwise I will implement at some point the method from the Calendar plugin, since it sounds more reliable anyway and probably works on mobile, whereas BrowserWindow doesn't.

fbreitwieser commented 1 year ago

Thanks replying so quickly @alangrainger ! I'll use the workaround logging in on a Windows or Mac. Thank you :)

Beingpax commented 12 months ago

This doesn't work for me as well. The window is still stuck at this Approved clicked.

alangrainger commented 12 months ago

Thanks @Beingpax . I've started work implementing auth the same way as the Calendar plugin, hope to have something out next week.

alangrainger commented 11 months ago

Documentation has been updated and plugin updated again, should be working just like the Calendar plugin now.

Update the plugin to 1.6.2 and follow the updated docs here:

https://github.com/alangrainger/obsidian-google-photos/blob/main/docs/Setup.md

fbreitwieser commented 11 months ago

Thanks so much @alangrainger !! Just tested it out and it worked very well. (Minor issue was that a restart of Obsidian was required after the set-up, otherwise I'd get 'Error 400: redirect_uri_mismatches'). Thanks for your great work and plugin :)

alangrainger commented 11 months ago

Thanks for the update @fbreitwieser , much appreciated! That extra restart issue is now fixed in 1.6.3