Developer Bypasses Missing Firefox API to Set Bookmark Keywords via Sync Encryption
A Firefox extension developer building Passport Containers needed to set bookmark keywords programmatically, but the WebExtensions bookmarks API has never supported keywords since a feature request was filed in 2016. An initial workaround intercepted address-bar searches and redirected them, but this lacked Firefox's native 'Visit' suggestion and stored keywords inside the extension rather than in Firefox itself. The developer discovered that Firefox Sync stores bookmark records on Mozilla's servers with a keyword field, meaning any client that writes to a synced record can set a real keyword across all devices. By implementing Mozilla's OAuth flow with scoped keys and PKCE, the extension retrieves the end-to-end encrypted Sync key without ever accessing the user's password, then writes the keyword directly into the bookmark's Sync record. The approach relies on a publicly known OAuth client ID intended for CLI use, since Mozilla does not issue Sync API access to third-party developers.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in