How to get autofill to identify Firefox extension?

Although Chrome extensions can be automatically detected using:

^(.*)extension:\/\/lcbjdhceifofjlpecfpeimnnphbcjgnc\/app\.html([\s\S]*)$

…where lcbjdhceifofjlpecfpeimnnphbcjgnc is, of course, the extension ID for https://chromewebstore.google.com/detail/xbrowsersync/lcbjdhceifofjlpecfpeimnnphbcjgnc, I have to use RegEx that instead cuts out the entire URI schema and uses the login page for a Firefox extension. However, when the login page is something like default.html, this is damn near useless, so I have to disable autofill to prevent it attempting to autofill into other extensions.

The problem is that as about:debugging#/runtime/this-firefox demonstrates (per Identifying Firefox extension by ID - addons.mozilla.org - Mozilla Discourse) although an extension ID exists (for instance, for xBrowserSync – Get this Extension for 🦊 Firefox (en-US), the extension ID is {019b606a-6f61-4d01-af2a-cea528f606da}) the internal ID of 5cd48fbb-73fc-40f1-8058-9045edf95361 is used in the eventual URI (moz-extension://5cd48fbb-73fc-40f1-8058-9045edf95361/manifest.json).

How can I consistently identify Firefox extensions? I fear I’ll have to put an FR in request that Bitwarden implement the ability to access the internal browser storage if there isn’t a method available currently.

Can you explain your use-case in a little more detail? Do you need the process to be automated, or do you just want a URI with a valid extension ID for one or more specific Firefox extensions?

1 Like

How to get autofill to identify Firefox extension? - #2 by grb

@grb, I am able to get Bitwarden to recognize when I’m viewing a Chrome extension listed in its relevant vault entry counterpart’s URI field, but I am unable to when utilizing Firefox, due to Firefox’s apparent dependence upon installation-specific “Internal UUIDs” rather than permanent “Extension IDs” (can be a UUID, can also be an e-mail address).

See 1877727 - *Allow* `moz-extension:` schema-prefixed URIs to access extension data via the Extension ID (as well as the Internal UUID)..

Yes, but is this just for a specific Firefox extension, or do you need some way to do this automatically for a large number of Firefox extensions?

For example, to find the ID used by the Bitwarden browser extension in Firefox, you can just open the extension, then right-click in the extension window and select “View Page Source”. You can then extract the extension ID from the URL in the browser address bar.

But perhaps I’ve misunderstood what you’re looking for.

How to get autofill to identify Firefox extension? - #4 by grb

@grb,

It’s not specific to one extension.

I expect so. I have no need for the Bitwarden extension ID, and I don’t know why anyone would use that method when I’ve already mentioned about:debugging#/runtime/this-firefox.

I was just using the Bitwarden extension as an example, since you weren’t providing any examples of specific extensions of interest to you.

But it seems I am unable to help with your issue. Good luck!

1 Like