-
-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XOAUTH2 authentication failed #536
Comments
Yep, the connection is no longer authenticated on gmail server side, due to the fact your computer suspended to RAM which caused it to drop the TCP network connection from your side to the Gmail imap server. The software needs a contributor to add code to detect this dropped network connection, and re-authenticate login. |
Linked to #56 . |
@DamienRobert
|
offlineimap fails for me after 1 hour of successful syncing with autorefresh=5, which I guess is related to:
|
Yep, the Gmail |
@chris001: I already had 'socktimeout=90'. I'll try with socktimeout=10, but this is not a real fix, this just means we hope that the timeout will occur before the connection is resumed after a suspend so that offlineimap will reset the connection properly. (I understand this is hard to fix). Thanks you all for your help. |
reset the oauth2_access_token before it expires use `expires_in` from oauth2 response to set when the access_token should be cleared divides the `expires_in` by 2 to ensure the access_token is cleared before it expires ref: OfflineIMAP#536
reset the oauth2_access_token before it expires use `expires_in` from oauth2 response to set when the access_token should be cleared divides the `expires_in` by 2 to ensure the access_token is cleared before it expires ref: OfflineIMAP#536
Use `expires_in` from the oauth2 response to reset the oauth2_access_token before it expires divides the `expires_in` by 2 to ensure the access_token is cleared before it expires ref: OfflineIMAP#536 Signed-off-by: Frode Aannevik <frode.aa@gmail.com>
Use `expires_in` from the oauth2 response to reset the oauth2_access_token before it expires divides the `expires_in` by 2 to ensure the access_token is cleared before it expires ref: #536 Signed-off-by: Frode Aannevik <frode.aa@gmail.com> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Using offlineimap 7.1.5, I fetch gmail emails via oauth2 token:
oauth2_client_id_eval = get_id_token_fromdict("gmail")
oauth2_client_secret_eval = get_secret_token_fromdict("gmail")
oauth2_refresh_token_eval = get_refresh_token_fromdict("gmail")
This work well at first, but after a while I get the following error messages:
XOAUTH2 authentication failed: [AUTHENTICATIONFAILED] Invalid credentials
Restarting offlineimap the authentification works again.
Just before it starts failing, I see
Attempting NOOP on dropped connection imap.gmail.com
(typically because I am resuming from suspend to ram).
So it would seems like somehow xoauth2 token are not correctly refreshed when restarting a dropped connection?
The text was updated successfully, but these errors were encountered: