GNU bug report logs -
#78366
30.1; auth-source-xoauth2-plugin conflicts with multiple Google accounts
Previous Next
Reported by: Anush V <j <at> gnu.org>
Date: Sun, 11 May 2025 02:46:02 UTC
Severity: normal
Tags: fixed
Found in version 30.1
Fixed in version 31.1
Done: Robert Pluim <rpluim <at> gmail.com>
Full log
Message #23 received at 78366 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Thu, 15 May 2025 00:17:02 -0700, Xiyue Deng <manphiz <at> gmail.com> said:
Xiyue> Thanks for the insights! I managed to reproduce the issue, and during
Xiyue> debugging I got the list from the reply as Anush mentioned. Turned out
Xiyue> that the return code was 334 server challenge[1], so it was waiting for
Xiyue> the correct user and password. Sometimes this was directly considered
Xiyue> authentication unsuccessful for Gmail[2]. `smtpmail-ok-p' considers a
Xiyue> return code less than 400 as successful, and only has challenge handling
Xiyue> implemented in cram-md5. As we should be providing the correct
Xiyue> credentials directly in xoauth2, 334 is effectively a failure.
Xiyue> Maybe in `smtpmail-try-auth-method' for xoauth2, if we see return code
Xiyue> 334, we should change the return value to "535 5.7.8 Authentication
Xiyue> credentials invalid". Would like to see whether the Emacs maintainers
Xiyue> this is a good idea.
Itʼs either that, or change `smtpmail-ok-p' to accept a second
optional parameter for which codes to accept for success, which seems
like overkill here.
Iʼm confused as to why Gmail is returning 334 here, if as you say the
credentials should be correct. Would answering the challenge help?
Xiyue> Meanwhile, a workaround for auth-source-xoauth2-plugin is to put xoauth2
Xiyue> as the last entry in `smtpmail-auth-supported'. Anush, can you try
Xiyue> enable auth-source-xoauth2-plugin and eval `(setq smtp-auth-supported
Xiyue> '(cram-md5 plain login xoauth2))' and see if this helps?
If this fixes the issue, you could put this workaround in your xoauth2
package.
Robert
--
This bug report was last modified 14 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.