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, 3 Aug 2021 14:27:49 -0500 Message-ID: <39093.96315.985670.24841@gargle.gargle.HOWL> References: <52589.36892.953561.24840@gargle.gargle.HOWL> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31727"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 03 21:28:36 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 1mB05c-00083q-D8 for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Aug 2021 21:28:36 +0200 Original-Received: from localhost ([::1]:59630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mB05b-0001j7-BF for ged-emacs-devel@m.gmane-mx.org; Tue, 03 Aug 2021 15:28:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mB04t-000136-7X for emacs-devel@gnu.org; Tue, 03 Aug 2021 15:27:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60786) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mB04s-0005he-Ij; Tue, 03 Aug 2021 15:27:50 -0400 Original-Received: from [2600:1700:5650:f790::42] (port=49252 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mB04s-0000m6-Dz; Tue, 03 Aug 2021 15:27:50 -0400 In-Reply-To: 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:271992 Archived-At: On Tue Aug 3 2021 Gregory Heytings wrote: > > It is my understanding, that support of oauth2 within the Emacs > > ecosystem is rather incomplete. > > It is not incomplete, > [snip] > > oauth2.el refreshes tokens automatically, so once the initial ugly > configuration is done, everything should work smoothly. Upon authentication, oauth2.el does not support `access_type=offline'. It is my understanding that this is needed to get upon authorization not only an access token, but also a refresh token. The latter is needed to grant an app continuous access beyond the short lifetime of an access token. However, the emacs url machinery also lacks the code that is needed to use the referesh token in order to request a new access token if the current access token has expired. This goes beyond the advice of url-http-handle-authentication that is currently used by oauth2.el. Let me know if I misunderstand the oauth2 protocol.