If running offlineimap it will show the following warning message (tested when using GMAIL)...
XOAUTH2 authentication failed: AUTHENTICATE command error: BAD ['Client aborted AUTHENTICATE command.
<randomstring>']. Data: DIEF2 AUTHENTICATE XOAUTH
... and then continue with the download/sync of emails.
You can get rid of the warning message, when adding auth_mechanisms = LOGIN .offlineimaprc in the <...>-remote section.