seanfarley / emacs-bitwarden

Emacs Bitwarden command wrapper.
GNU General Public License v3.0
50 stars 13 forks source link

Add support for bitwarden API key based login #11

Closed jsilve24 closed 2 years ago

jsilve24 commented 2 years ago

Fixes #10

This adds two custom variables bitwarden-api-secret-key and bitwarden-api-client-id that have the same interface as the existing bitwarden-automatic-unlock. These are optional but used as the prefered login method if non-nil. I have updated the readme providing guidance on how to obtain an API key and client_id and emphasizing that this approach only need to be used if users are storing their valult on bitwarden servers.

seanfarley commented 2 years ago

Oh, nice! I'll try to take a look this weekend :-D

jsilve24 commented 2 years ago

Ya sorry. That got included without me realizing. But yes, reading through the code that seemed like the more appropriate wording. I was getting a bunch of "not logged in" errors despite having just received confirmation from another function that I was logged in. Really that message seemed to be needed when the vault is not unlocked.

Sent From My Mobile Device


From: Sean Farley @.> Sent: Saturday, May 21, 2022 3:43:06 PM To: seanfarley/emacs-bitwarden @.> Cc: Justin Silverman @.>; Author @.> Subject: Re: [seanfarley/emacs-bitwarden] Add support for bitwarden API key based login (PR #11)

@seanfarley commented on this pull request.


In bitwarden.elhttps://github.com/seanfarley/emacs-bitwarden/pull/11#discussion_r878753290:

@@ -614,7 +633,7 @@ If optional argument GROUP is given, only entries in GROUP will be listed." :notify 'bitwarden-list-cancel-dialog "Cancel") (goto-char (point-min)))

  • (bitwarden--message "not logged in!" nil t)))
  • (bitwarden--message "vault not unlocked!" nil t)))

Oh, ok, I think I see. It's just better wording since the vault could be locked or logged out.

— Reply to this email directly, view it on GitHubhttps://github.com/seanfarley/emacs-bitwarden/pull/11#discussion_r878753290, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AADOORT64AFMCPCLIQHKM43VLE4EVANCNFSM5WMGNU5Q. You are receiving this because you authored the thread.Message ID: @.***>

seanfarley commented 2 years ago

I added some minor commits to clean up the readme and remove tabs, but it's now merged! Thanks for your contribution!