From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrew Cohen Newsgroups: gmane.emacs.devel Subject: Re: Making GNUS continue to work with Gmail Date: Thu, 27 Aug 2020 20:30:22 +0800 Message-ID: <873648mftt.fsf@ust.hk> References: <871rkfhkhc.fsf@mat.ucm.es> <875z9p5hnc.fsf@mat.ucm.es> <87364pbkn0.fsf@gnus.org> <87lfihe0zf.fsf@mat.ucm.es> <874kp55l8t.fsf@gnus.org> <87y2mdnwn2.fsf@mat.ucm.es> <87blixbh71.fsf@ucl.ac.uk> <87d03cpbu3.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11035"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Cancel-Lock: sha1:qgdKecXLQulv29qE9wbOFZMfYdY= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Aug 27 14:31:36 2020 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 1kBH42-0002h1-Sq for ged-emacs-devel@m.gmane-mx.org; Thu, 27 Aug 2020 14:31:34 +0200 Original-Received: from localhost ([::1]:55826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBH41-0004Yp-Uj for ged-emacs-devel@m.gmane-mx.org; Thu, 27 Aug 2020 08:31:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBH3P-00048G-QP for emacs-devel@gnu.org; Thu, 27 Aug 2020 08:30:55 -0400 Original-Received: from static.214.254.202.116.clients.your-server.de ([116.202.254.214]:39872 helo=ciao.gmane.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBH3N-0004nf-Ia for emacs-devel@gnu.org; Thu, 27 Aug 2020 08:30:55 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1kBH3L-0001yA-7J for emacs-devel@gnu.org; Thu, 27 Aug 2020 14:30:51 +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-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/27 07:25:19 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:254291 Archived-At: Microsoft has deferred retiring Basic Authentication for existing customers until the second half of 2021 due to covid-19. New customers, or those with no recorded usage, will have Basic Authentication disabled as scheduled, October 2020. https://developer.microsoft.com/en-us/office/blogs/deferred-end-of-support-date-for-basic-authentication-in-exchange-online/ For what its worth the outlook issues are similar to (or the same as) gmail: registering a client with MS (or google) and then using a potentially problematic web page to obtain a refresh-token. Once this is done it is quite easy (in both gmail and outlook) to use the oauth2.el library to authenticate. In case anyone is interested in the details: 1. Refreshing the access-token using the oauth2.el library didn't work at first. Turns out MS forbids including the client_secret in the params list, while google requires it. I've changed oauth2.el to handle this trivial issue. 2. There are a several packages floating around to make this work but I realized it can be done with existing mechanisms with one minor change to auth-source.el (which I just pushed to master), allowing the plstore backend to store a function that retrieves the password rather than the password itself. Then setting this slot to the function from oauth2.el that refreshes the token makes everything just work. If anyone wants more details let me know. Best, Andy