From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72358: 29.4; oauth2.el improvements Date: Wed, 31 Jul 2024 00:51:52 +0300 Message-ID: <43385.2252712072$1722376401@news.gmane.org> References: <87mslz8yzk.fsf@debian-hx90.lan> <66a8f3d6.050a0220.8facb.d530SMTPIN_ADDED_BROKEN@mx.google.com> <875xsm8y6c.fsf@debian-hx90.lan> Reply-To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7622"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 72358@debbugs.gnu.org To: Xiyue Deng Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 30 23:53:12 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1sYumO-0001lu-8R for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 30 Jul 2024 23:53:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYum9-0003ep-Ts; Tue, 30 Jul 2024 17:52:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYulz-0003e5-UC for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2024 17:52:48 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYulz-0002Pm-GU for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2024 17:52:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=3tqk/qNp3zuYm5aw2dRW2oD8L0z0w5TfC6xhf1DgTLM=; b=kYIA3n2Np2TLpJnyYgoPHIBJ0eDHGrsV0ojmjEwlGqYviOOz9x/hjvC9/1UXE+7OI3mIbejhMuCo3U3Hq4M95x0onRqLqAm99LBjG5B0xYr3gWRZAkQrbil+qpP869XOyCsF3qqfnTn+pU4ugVr/a0tMntGKb2nvfjgVpMLUKvj5q0w0Ch3v2Hv5NbyGzF++fmp5NEZ6rVvG7ek5rRZSFfIUXcaayxZBtS2Cgf+KtokkwLfEKaK9PNioiChXxwmpwcqE6u6QvF7334xd/uN02hDKivto7DGaLswbqxDS+lABCYsjoSsg6OhHndnYo5Yqk0qN0tPoBz7S6emFLkELpQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sYumE-0001MJ-3u for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2024 17:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Jul 2024 21:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72358 X-GNU-PR-Package: emacs Original-Received: via spool by 72358-submit@debbugs.gnu.org id=B72358.17223763655198 (code B ref 72358); Tue, 30 Jul 2024 21:53:02 +0000 Original-Received: (at 72358) by debbugs.gnu.org; 30 Jul 2024 21:52:45 +0000 Original-Received: from localhost ([127.0.0.1]:48659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYulx-0001Ll-FU for submit@debbugs.gnu.org; Tue, 30 Jul 2024 17:52:45 -0400 Original-Received: from thaodan.de ([185.216.177.71]:46452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYulv-0001LY-J8 for 72358@debbugs.gnu.org; Tue, 30 Jul 2024 17:52:44 -0400 Original-Received: from odin (dsl-trebng12-50dc75-154.dhcp.inet.fi [80.220.117.154]) by thaodan.de (Postfix) with ESMTPSA id 51E8AD0004E; Wed, 31 Jul 2024 00:51:53 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1722376313; bh=sdH3uwrC5r4j7NqvKz3oyJ7My6XogLAjMcqONGPkCq0=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=sMQIVAa9cGteHU2asLlLk1jB0l2opjjfI9XXNxr6AKv/bJomrlSLK0py0IFviOt9r B0gOWYr5FPf4y+kzDEVSEJwEkMGGHqQ8BIgTTB5l40MFKJQnRyxT8IQzAHUmbXjfZW Zz7L6U67MPJ9UIseXUumvNZlJQOkUf/e5OfGWAmG19CN23UUxijfW3KoeSwRPp/OoG hvVs2/7RkhFVVr//vhriBiHgqwbcd2XlJe0vERM5nQ1Vyrcm3hCMYiR6K9GOF2s/0V 1Eco9/SWdrcm8KvT/WtO32Ra8FYGlpf8BeD53kxsxm3Z8dhxxczZD+ucE6hGv+R3Jw EHT2BJNg4viv6WjT3PoV/x4lOLhxRAtTwIdJQg0KxyIMz3alKzxNWbaZTfZuBF3XaW UFJP2D5u7Hon6xRMDtziaMcqJgeOOlkStiigJmXx6ZYaQTkgyyC260DQCyIsmUGsi2 2l8YO9Tqzt5C7goYbfeoPUnqN48ekoM5oaaA5EiI9R2DctHK6oDaD6cBLYS/Z93Ux/ 0bQjcHtZq671F/zARuFTIS7wQjSNuDJIFP3p7dItI+XucOE7b7+QpgnY8T+XoKJ3dv 8Wob0lI3qxh7VZk9MZmr0PMASHe40fSDBtrZJybcRaK+UL07hjSxRydu6CPs/XVZJ1 GFPXwIYR64pH8j2qJHScsrfQ= In-Reply-To: <875xsm8y6c.fsf@debian-hx90.lan> (Xiyue Deng's message of "Tue, 30 Jul 2024 12:41:47 -0700") Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289567 Archived-At: Xiyue Deng writes: > Bj=C3=B6rn Bidar writes: > >> Xiyue Deng writes: >> >>> The fourth patch may need a bit of background: oauth2.el (optionally) >>> uses plstore to save authentication data for future reuse, and the >>> plstore id for an account is computed using a combination of `auth-url', >>> `token-url', and `scope'. However, this combination of data doesn't >>> guarantee uniqueness for accounts for a same provider, e.g. for Gmail, >>> the three parameters are the same for different accounts, and hence >>> storing a second account information will override the first one. >> >> Would it make sense to plug OAuth2.el into auth-source to store the >> authentication token safely inside an existing credential storage? >> >> Various applications already do so when using the native credential >> storages such as Freedesktop.org or the macOS keyring. > > As I mentioned to Robert, I do have another addon to do exactly this, > though through an awkward advice. Would be great if auth-source can > make use of oauth2.el and handle that more gracefully. I'll file > another bug to explore options once this one is done. Care to post this advice? It's not an optimal solution but better than nothing in the interim.