all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Soham Gumaste <sohamg2@gmail.com>
To: Xiyue Deng <manphiz@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Potential bug/inconsistency in auth-source netrc vs plstore backends
Date: Thu, 7 Nov 2024 20:28:49 -0600	[thread overview]
Message-ID: <CAAr-Hh17abY6Ue469ud-=pu8zrexB1=YzpGaWtCVi8X4nB9cDA@mail.gmail.com> (raw)
In-Reply-To: <87iksysp82.fsf@debian-hx90.lan>

Hello, thanks for the reply!

>
> I have done some recent improvements to `oauth2.el'[1] and provided a
> hackish solution to use it with auth-source[2].  I wonder whether you
> have tried those out and would like to get your feedback.
>

My changes are not that elaborate, Im just trying to convince
auth-sources that the oauth2 access token is a "password"

> I am also interested in what you are adding to/modifying `oauth2.el'.
> In case it's related, in the previous bugs I saw people seemed confused
> about why `oauth2.el' used a separate storage for storing
> refresh_token/access_token/etc. while still keeping the other
> credentials (e.g. client_id, client_secret, etc.) in auth-sources.  My
> understanding is that the data in the separate plstore are ephemeral,
> e.g. they can expire and need to be refreshed, so it makes sense to use
> a separate storage.  This also can be helpful in case you want to keep
> it in sync among multiple machines.
>

I didn't take the ephemeral part into account. What I am doing is summarised as:
1) Change the default filename to be `oauth2.plist` instead of
`oauth2.plstore` as that automatically activates the plstore backend
in auth-info when the file is listed in auth-sources
2) Store the access-token a second time as `:secret`
3) Store additional data like :user/:login and :host

I can share my patch if you're curious but it really isn't ready/in
the hacking stage. Basically my reference point is to make it satisfy
the search query in nnimap.el/smtpmail.el which is my use case.

My roadblock currently is that the auth-sources-plstore-search
function REQUIRES that the :port also matches, whereas the netrc
backend has no such requirement. I could just save all the ports im
going to use in the plist file but thats really a non-solution and I'd
like more clarity on this discrepancy.

Thanks,
-- 
Soham Gumaste
sohamg2@gmail.com



  reply	other threads:[~2024-11-08  2:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07 20:34 Potential bug/inconsistency in auth-source netrc vs plstore backends Soham Gumaste
2024-11-07 20:43 ` Soham Gumaste
2024-11-07 21:34 ` Xiyue Deng
2024-11-08  2:28   ` Soham Gumaste [this message]
2024-11-08  8:40 ` Michael Albinus
2024-11-08 18:00   ` Soham Gumaste
2024-11-08 22:11     ` Xiyue Deng
2024-11-10 18:29       ` Soham Gumaste
2024-11-10 23:58         ` Xiyue Deng
2024-11-15 16:54           ` Soham Gumaste

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAr-Hh17abY6Ue469ud-=pu8zrexB1=YzpGaWtCVi8X4nB9cDA@mail.gmail.com' \
    --to=sohamg2@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=manphiz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.