Closed Bug 1644000 Opened 4 years ago Closed 4 years ago

Support browser.identity

Categories

(Thunderbird :: Add-Ons: Extensions API, enhancement)

enhancement

Tracking

(thunderbird78+ fixed)

RESOLVED FIXED
Thunderbird 79.0
Tracking Status
thunderbird78 + fixed

People

(Reporter: kam193, Assigned: darktrojan)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0

Steps to reproduce:

I want to authorize user in an extension using OAuth2

Actual results:

Thunderbird MailExtension doesn't implement standard browser.identity (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/identity)

Expected results:

I would like to see browser.identity support in MailExtension

Version: 78 → 77

I didn't know this was a thing! I wish I had known a long time ago now.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: 77 → unspecified

I found it last time, but it looks like crucial feature to easily authenticate with OAuth2 in extensions. I hope we can implement it :)

Assignee: nobody → geoff
Status: NEW → ASSIGNED
Depends on: 1644083

This is easy enough to enable, but we'll need bug 1644083 first. All of the code is in toolkit, we just need to link to it from ext-mail.js (it's not linked from ext-toolkit.js because Android Firefox doesn't have it).

The API itself opens a new window with the URL of BROWSER_CHROME_URL, which is for some bizarre reason pointing at messengercompose.xhtml now. I've looked into removing BROWSER_CHROME_URL altogether before, so I know it's okay to change it.

Attachment #9154879 - Flags: review?(mkmelin+mozilla)

I tested this with the google-userinfo sample extension. Getting the automated tests for it running isn't possible at the moment because they're mochitest-plain, and we can't run that suite.

Nice to see it! I'm pleased that it looks doable, I spent a few hours working on a workaround unsuccessfully.

Attachment #9154879 - Flags: review?(mkmelin+mozilla) → review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/3e9b60644f25
Enable browser.identity API. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 79.0

Thank you so much! Now in a 0.5h I built draft of the extension I'm working on.

Comment on attachment 9154879 [details] [diff] [review]
1644000-identity-api-1.diff

New WX API implementation (not risky)
Attachment #9154879 - Flags: approval-comm-beta?
Comment on attachment 9154879 [details] [diff] [review]
1644000-identity-api-1.diff

Approved for beta
Attachment #9154879 - Flags: approval-comm-beta? → approval-comm-beta+
Regressions: 1644930
See Also: → 1721671
See Also: 1721671
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: