From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Roland Winkler Newsgroups: gmane.emacs.devel Subject: Re: oauth2 support for Emacs email clients Date: Tue, 03 Aug 2021 14:38:53 -0500 Message-ID: <871r7a2u9e.fsf@gnu.org> References: <52589.36892.953561.24840@gargle.gargle.HOWL> <87r1fb7xbk.fsf@ust.hk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8600"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) To: emacs-devel@gnu.org Cancel-Lock: sha1:aY4D908dhNh+gatPbWypzmAxR1k= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 03 21:40:01 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mB0Gf-0001uU-LI for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Aug 2021 21:40:01 +0200 Original-Received: from localhost ([::1]:43662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mB0Ge-00027n-Hd for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Aug 2021 15:40:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mB0Fl-0001RX-O1 for emacs-devel@gnu.org; Tue, 03 Aug 2021 15:39:05 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:39156) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mB0Fk-0005Ac-7l for emacs-devel@gnu.org; Tue, 03 Aug 2021 15:39:05 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mB0Fi-0000Ws-AW for emacs-devel@gnu.org; Tue, 03 Aug 2021 21:39:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.248, NICE_REPLY_C=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:271993 Archived-At: On Tue, Aug 03 2021, Andrew Cohen wrote: >>>>>> "RW" == Roland Winkler writes: > But the truly hacky part---the information for refreshing the token is > stored in an auth-source file, where the "secret" is a function that > refreshes the token and returns the new credential. > > Once set up it works pretty well (although it asks for the password for > the auth-source file frequently---I haven't had time to learn how > auth-source decides when a password is required so this should be easily > fixable---its not frequent enough to really bother me and my emacs time > is very limited these days). As I said in another reply to this thread, I believe that the problem with frequent password requests is due to the fact that oauth2.el does not support `access_type=offline' upon authentication. > If you want to try it let me know and I'll try to walk you through the > setup. Thanks, I got this part working. But I realized that davmail mentioned elsewhere in this thread gives me, all in all, a smoother work flow. > diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el > > diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el I suggest to apply these steps to the emacs trunk, as one step towards better oauth2 support.