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: Sun, 08 Aug 2021 18:48:50 -0500 Message-ID: <87eeb3fqfx.fsf@gnu.org> References: <52589.36892.953561.24840@gargle.gargle.HOWL> <87pmuofpai.fsf@gnu.org> <87bl68la88.fsf@linux-m68k.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18347"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cc: Richard Stallman , emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 09 01:49:28 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 1mCsXn-0004hQ-Mj for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Aug 2021 01:49:27 +0200 Original-Received: from localhost ([::1]:48968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCsXm-0005VV-OF for ged-emacs-devel@m.gmane-mx.org; Sun, 08 Aug 2021 19:49:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCsXK-0004qa-C7 for emacs-devel@gnu.org; Sun, 08 Aug 2021 19:48:58 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50040) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCsXJ-0007Me-0x; Sun, 08 Aug 2021 19:48:57 -0400 Original-Received: from [2600:1700:5650:f790::42] (port=35924 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCsXC-0001Zk-VW; Sun, 08 Aug 2021 19:48:51 -0400 In-Reply-To: <87bl68la88.fsf@linux-m68k.org> (Andreas Schwab's message of "Sun, 08 Aug 2021 08:30:15 +0200") 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:272217 Archived-At: On Sun, Aug 08 2021, Andreas Schwab wrote: > On Aug 08 2021, Roland Winkler wrote: > >> Also, I have not yet been able to figure out what happens when a new >> emacs session is started. oauth2.el uses plstore. Does this work >> across multiple emacs sessions, or is it then necessary to go again >> through the (more tedious) multi-factor authentication? > > As long as the refresh token remains valid, oauth2.el can refresh the > auth token automatically with the refresh token. The refresh token is > all you need to be able to access the IMAP account. Thanks. My reading of the code of oauth2.el is that oauth2-compute-id derives the id for plstore from auth-url, token-url, and scope. It seems to me that this will get confused with, say, two different Office365 accounts that have the same auth-url, token-url, and scope. Should the code use also additional information such as the user name? (I do not know much about plstore.el used by oauth2.el.)