YukiGasai / obsidian-google-calendar

Add Google Calendar inside Obsidian
https://yukigasai.github.io/obsidian-google-calendar/
GNU General Public License v3.0
359 stars 25 forks source link

I keep needing to logout and login frequently for the plugin to work. #149

Closed machado-t closed 11 months ago

machado-t commented 1 year ago

Without any notice, the plugin frequently (~twice a week) stops working. I figured a way to make it work again: I logout and login again in the settings, which is a pain. Any idea why this is happening? Thanks

hx2A commented 1 year ago

I'm having the same problem. Have we done the setup incorrectly? What can we do to help you debug this?

YukiGasai commented 1 year ago

Hi, I am currently reworking the OAuth process as part of my bachelor thesis, that should address this issue. But it will take some more time to finish everything. You can test the updated process from the Branch ba-auth-improvments if you like.

hx2A commented 1 year ago

Hi, I am currently reworking the OAuth process as part of my bachelor thesis, that should address this issue. But it will take some more time to finish everything. You can test the updated process from the Branch ba-auth-improvments if you like.

Excellent, thank you very much for your reply. I can certainly be patient and will wait for you to make that change to this most useful Obsidian plugin.

mathisgauthey commented 1 year ago

Hey there, same issue here, I'll be waiting as well!

YukiGasai commented 1 year ago

I checked the new version of the OAuth process and think that the same issue could occur there. My guess is, that the OAuth Refresh Token will get invalid after seven days because the project we all created is running in test mode. Google Docu image

A possible solution could be to switch from test to production inside the Google Cloud Console. image Google will ask for a validation, but as long as everyone is using their own client after google guidelines, no verification is needed. The drawback is an extra screen during the login process that will warn the user that the client is not validated by google. image

I will test this myself, and it would be nice if someone else could test this idea.

mathisgauthey commented 1 year ago

I checked the new version of the OAuth process and think that the same issue could occur there. My guess is, that the OAuth Refresh Token will get invalid after seven days because the project we all created is running in test mode. Google Docu image

A possible solution could be to switch from test to production inside the Google Cloud Console. image Google will ask for a validation, but as long as everyone is using their own client after google guidelines, no verification is needed. The drawback is an extra screen during the login process that will warn the user that the client is not validated by google. image

I will test this myself, and it would be nice if someone else could test this idea.

Hi there, I wanted to give it a try but it appears that publishing the app would make it visible and usable by anyone with a google account, wheareas it was only accessible to people we added on the user step of your guide before. If you have some informations about that before I test it on my end as well, I'd be glad !

YukiGasai commented 1 year ago

Hi, it is true that if you publish the app, anyone with a Google account can use it, but they also need to have your Client ID and Client secret, which you should not share.

mathisgauthey commented 1 year ago

Hi, it is true that if you publish the app, anyone with a Google account can use it, but they also need to have your Client ID and Client secret, which you should not share.

Fine by me then, I'll do the changes required and keep you updated ✌️

adamhl8 commented 1 year ago

@YukiGasai I published my app over a week ago and haven't been logged out since, so it seems like this definitely solves the issue. Maybe it would be worth referencing this issue in the readme?

mathisgauthey commented 1 year ago

@YukiGasai same here for me, the changes worked, I don't have to reconnect every week now.

halldk commented 11 months ago

Thanks! I was wondering about this.

YukiGasai commented 11 months ago

Thank you for all your feedback. The step-by-step guide is updated and I added a video showing the steps.