jfitzell / mozilla-keychain

Store your Firefox website usernames and passwords in Apple's Keychain Services, just like Safari and other browsers do on OS X.
55 stars 9 forks source link

RFE: also save caldav/oauth passwords for Thunderbird+Lightning #76

Open brad2014 opened 9 years ago

brad2014 commented 9 years ago

I love this addin. Thank you for making it.

It turns out I read and write my google calendar using the Caldav functionality in lightning.

After installing mozilla-keychain, I had to relog in to google, get a new oauth token. I notice that it is stored in signons.txt, but it is not visible in the Thunderbird "Preferences->Security->Passwords->Saved Passwords..." window.

Expected behavior: OAuth token would be read/written to keychain (instead of signons.txt), and would appear in the saved passwords list.

I believe my caldav calendars that use passwords with basic authentication work fine.

Environment: Mac OSX 10.10.2 Thunderbird 31.5.0 Lightning 3.3.3. Keychain Services Integration 1.1.7

brad2014 commented 9 years ago

From the debug log, it appears Lightning is saving the signon info in a form macos-keychain is not expecting. The hostname and username are both set by lightning to the calendar UUID.

screen shot 2015-03-24 at 6 13 56 pm

In case it helps: My quick and dirty workaround was to hack Lightning where it special-cases Google OAuth, to pass a URL in the hostname parameter (instead of the calendar's UUID, as they do now) for this one case (caldav + googleOAuth). This matches the other usages I see for the moz_logins.hostname field, and matches what mozilla-keychain expects. I guess the fix would be for mozilla-keychain to create a generic keychain entry from the signon data Lightning is actually generating in this case (I noticed a TODO in the code related to that).