gauteh / lieer

Fast email-fetching and sending and two-way tag synchronization between notmuch and GMail
http://lieer.gaute.vetsj.com
Other
497 stars 60 forks source link

Is it expected to have to re-auth once a week? #196

Closed guiniol closed 2 years ago

guiniol commented 3 years ago

Hi there!

I set up gmailieer recently, and it worked without a hitch. I decided to use my own custom key to avoid throttling (little good that seemed to do :smile: ), but now I see that I have to re-auth once a week. Does that also happen with the shared API key? Did I setup my private API key wrong?

Cheers,

-- guiniol

gauteh commented 3 years ago

That is not expected 🙂 haven't heard about that before. Usually never have to re-auth as long as it doesn't go to far between sync (many months), then token is refreshed without needing user action.

man. 29. mar. 2021, 20:13 skrev guiniol @.***>:

Hi there!

I set up gmailieer recently, and it worked without a hitch. I decided to use my own custom key to avoid throttling (little good that seemed to do 😄 ), but now I see that I have to re-auth once a week. Does that also happen with the shared API key? Did I setup my private API key wrong?

Cheers,

-- guiniol

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gauteh/lieer/issues/196, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAN367G7TMPGXXQBYZSJH3TGDGO5ANCNFSM42AC5Y6A .

guiniol commented 3 years ago

Ack. No idea how to fix it then. I'll see what I find out.

gauteh commented 3 years ago

Do you also specify the private api key everytime you use gmi? Otherwise it will fail to refresh token, and you need to re-auth.

man. 29. mar. 2021, 20:51 skrev guiniol @.***>:

Ack. No idea how to fix it then. I'll see what I find out.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gauteh/lieer/issues/196#issuecomment-809626360, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAN36YI3S7SG642OSCLXI3TGDK4ZANCNFSM42AC5Y6A .

guiniol commented 3 years ago

I have the -c option with the path to my API key. Is there something else I should specify?

gauteh commented 3 years ago

No, that should be enough. As long as you always use it.

On Mon, Mar 29, 2021 at 9:03 PM guiniol @.***> wrote:

I have the -c option with the path to my API key. Is there something else I should specify?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gauteh/lieer/issues/196#issuecomment-809633756, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAN36ZAZDXPEXPOFYJDYMTTGDMHNANCNFSM42AC5Y6A .

guiniol commented 3 years ago

Tried with the API key bundled with gmailieer, and I get the same results. No idea what is going on. Maybe I need to disable some kind of security setting in my account?

guiniol commented 3 years ago

Still happening. I must be doing something wrong if I am the only person with this problem. Could you share how the API access is setup (as in, which parts of the Gmail API the project is allowed to access) for the shared API key?

gauteh commented 3 years ago

Think that should be here: https://github.com/gauteh/lieer/blob/master/lieer/remote.py#L29

guiniol commented 3 years ago

Thanks, I adjusted accordingly. We'll see in a week :D

guiniol commented 3 years ago

Still happening... I have setup the access for my API key the same way yours is (and gmi is working), but whether I use your API key or mine, I have to re-auth every week. I wonder if there is some kind of settings in my google account that is triggering that. I have other projects access eg calendar in a similar way and no issues. It's really weird.

khardix commented 3 years ago

You are not alone in this, @guiniol – I have this problem also :slightly_smiling_face: Although I was not passing the custom credentials to all invocations – I have added that now. However, other software (vdirsyncer to be specific) also display this issue, and I have that configured to use the credentials on every command.

Since this not seem to be gmi-specific, I tried to poke around and found out that the oauth2client is now deprecated in favor of google-auth and/or oauthlib. Perhaps this is related (i.e. the oauth2client no longer getting the updates needed to access current Google APIs)?

guiniol commented 3 years ago

Thank you!!

I also use vdirsyncer and haven't seen (or haven't noticed) that yet.

gauteh commented 2 years ago

Any changes?

guiniol commented 2 years ago

No, still the same. I actually had to login to be able to sync and see your message.

mjg commented 2 years ago

I see the same effect when I use my own API keys for mbsync and such (different API parts, though). I think this is connected to the fact that the "app" that you register is considered experimental and would need to be approved by Google, but I might be completely wrong. For lieer, I switched back to the shipped keys because of that.

gauteh commented 2 years ago

That is interesting! Can anyone else confirm whether using your own API keys also requires re-auth? We should add a note to the README about this in that case.

guiniol commented 2 years ago

I am still seeing this with my own API key. Right now, I have reverted to using the shared API key to see if I still have to re-auth with it (as that was the case earlier, but I may have made a mistake somewhere). We'll see in a week.

guiniol commented 2 years ago

So, after reverting to the shared API key, I haven't had to re-auth. My guess would be something to do with keys created after a certain date having some authorisation removed.

gauteh commented 2 years ago

Ok. Thanks for letting us know. I will close this for now with the explanation that it now seems that private API keys require re-auth.