From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Xiyue Deng Newsgroups: gmane.emacs.bugs Subject: bug#72358: 29.4; oauth2.el improvements Date: Wed, 31 Jul 2024 00:43:34 -0700 Message-ID: <87wml26m6x.fsf@debian-hx90.lan> References: <87mslz8yzk.fsf@debian-hx90.lan> <66a8f3d6.050a0220.8facb.d530SMTPIN_ADDED_BROKEN@mx.google.com> <875xsm8y6c.fsf@debian-hx90.lan> <66a96079.170a0220.1522dd.3e68SMTPIN_ADDED_BROKEN@mx.google.com> 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="40922"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72358@debbugs.gnu.org To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 31 09:46:03 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 1sZ427-000ATk-BB for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Jul 2024 09:46:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sZ41t-0004q4-EV; Wed, 31 Jul 2024 03:45:49 -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 1sZ41q-0004fT-Tk for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2024 03:45: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 1sZ41q-00016b-HK for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2024 03:45:46 -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=Xb8/e+L78h8Yf/Cuyoun9Y3JqXdYouKRAEOXPwucQuY=; b=ZUvMZ1TQZESwaPO4iNCGHoJfpevqloNaojcuNg5c9lDHk4RvExJDvG18zBQy5ZEbFSH1i2SSj3Uu58SSbnzVPeAUiucY2kYAv4/YUJtWSMg1xZEkd2wVm+ECC5VNsRjoBQHNUfZzEjyMT5wBuK7ug9fyFg3Ge4vpi1CM2HsC5R48ZJvMH3L1a0vaid58U4aImog7gbBA2wrOy1XEqrORZ5j2qshC+QyUcQGXM15UxfVEG2H0YORx8LqNsbmdraCPVCJ6wCWImKKB/2C9+G9mYkb6gLUl5WBETvE0Gm3g086llJ51kEqj+PFVyzHT3/X3O5YTlnKvhQXBxuA1st5iCw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sZ425-0008Dt-MQ for bug-gnu-emacs@gnu.org; Wed, 31 Jul 2024 03:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Xiyue Deng Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Jul 2024 07:46:01 +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.172241190231507 (code B ref 72358); Wed, 31 Jul 2024 07:46:01 +0000 Original-Received: (at 72358) by debbugs.gnu.org; 31 Jul 2024 07:45:02 +0000 Original-Received: from localhost ([127.0.0.1]:48969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZ417-0008Bk-BO for submit@debbugs.gnu.org; Wed, 31 Jul 2024 03:45:02 -0400 Original-Received: from mail-pl1-f181.google.com ([209.85.214.181]:46475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZ415-0008BL-02 for 72358@debbugs.gnu.org; Wed, 31 Jul 2024 03:44:59 -0400 Original-Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1fd90c2fc68so41471265ad.1 for <72358@debbugs.gnu.org>; Wed, 31 Jul 2024 00:44:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722411818; x=1723016618; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Xb8/e+L78h8Yf/Cuyoun9Y3JqXdYouKRAEOXPwucQuY=; b=aaYtEpDp8KyfLX+7iXw2Ssq5CnpTpHj3ptxOz8kS641bI/AtqER+dp0xuwbXxgT7FK 64Np+OCw+Wxl1uY9HlkM0UJmVAlyg7n1RHWf7g/j4BHTIFrMVBwICAljQ2rL9HvWA1Hm eYOMlCiWtVwRRcC3i1gJKdV7KQPO/qF3BJT2z6kzdftY2y6pqprB/tdliF9qchapyZ9C 4Fr0pvFaGv7UoKZ9XlndQRXAlaJAmiqGa4T5pmwW0KLtz8W3VpfKjbqxpesCECQXR7N4 privs0gPxhsLgLmwOO/WcnYPdYet7ULdP64pHDHZUWlwF6XVoxJJ1bLfpBAi7KRCYfpO MnTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722411818; x=1723016618; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xb8/e+L78h8Yf/Cuyoun9Y3JqXdYouKRAEOXPwucQuY=; b=kB1NXO3/XNn3Y8d1fbiuCl36jhVtsELvn1lDdd/du7fFiYQTNWGgwEJATYSwy8XNNC 4567Kov6xBxQNUtvGEvGzIzJGks3rhVyCiVUR6U2sDq3zaQUXZTPoX4HaR9CAlJVSCd1 7+a/qHLtzY8NgVQfl4N/6RQkavjs7aa69bAtSVVSJwt9cfY+Wtez/b8e2CaGd74d+l7J soEQDuit9PX5TBI+7M/MFVHoqmpvI4ozjrr1AIiGpdELK+eDIW0nlxr9fEVeYM1oO7qA HBN7LW6maGfIKB61JUnSizNVwoejzLJ0Gw6h/Ml05AF6UTqktK9I9gtX4jA7QfEJsPQx xIVw== X-Gm-Message-State: AOJu0Yx5pNDD9c85UjVv5zqJSA9XByr1Ua7k+E3iZdbFVx1+jFw4oZhH M1w2TSils3B5phvyrRbvkv1a3102uAHUNN5IaVehCp/SBD1GnfL3f2ALOg0z X-Google-Smtp-Source: AGHT+IGtc9m2JEfeuAdGpVQtgQKflciqKL8ClLBSnGwqmzKEYxs5dx0R/HldHRiBM0Fyqzd0bbYodg== X-Received: by 2002:a17:903:186:b0:1fd:5fa0:e996 with SMTP id d9443c01a7336-1ff048e4f43mr128194335ad.43.1722411817480; Wed, 31 Jul 2024 00:43:37 -0700 (PDT) Original-Received: from debian-hx90 (syn-104-172-240-218.res.spectrum.com. [104.172.240.218]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fed7ff65f4sm113751735ad.300.2024.07.31.00.43.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jul 2024 00:43:37 -0700 (PDT) In-Reply-To: <66a96079.170a0220.1522dd.3e68SMTPIN_ADDED_BROKEN@mx.google.com> ("=?UTF-8?Q?Bj=C3=B6rn?= Bidar"'s message of "Wed, 31 Jul 2024 00:51:52 +0300") 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:289576 Archived-At: Bj=C3=B6rn Bidar writes: > 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. It currently depends on this modified oauth2.el. Once the patches are accepted I'll post it in a separate bug. --=20 Xiyue Deng