Anon Link Chrome Extension
Use the Anon Chrome Extension Library to create your own chrome extension.
When using Anon Link for web, your users will be prompted to install an extension which must run Anon’s Chrome Extension Library.
You can configure this extension using the chromeExtensionId
parameter when creating a link url. By default, this parameter is set to use Anon’s chrome extension ID: lbgbplnejdpahnfmnphghjlbedpjjbgd
.
Chrome Extension Options
You have three options:
-
Use Anon’s official Chrome extension
-
Build your own custom extension
- Use our extension example
- Customize with your own branding
- Includes pre-configured Anon Chrome Extension Library
-
Integrate with your existing extension
- Install the Anon Chrome Extension Library into your current Chrome extension
Add to Your Existing Chrome Extension
This guide assumes you have an existing chrome extension project.
If you are starting from scratch, get started with our Chrome extension example, and skip to Step: Install the Chrome Extension!
Create a .npmrc File
.npmrc
files are supported by both yarn
and npm
for installing packages from other package registries.
And yes, this is a public authToken :)
Install the Anon Chrome Extension Library
Configure the extension manifest
Add the following permissions to your extension’s manifest.
For reference, see our example extension manifest here.
Initialize the library
Add this code snippet at the top of your background script:
Install the Chrome Extension
- Run
npm build
- Go to “Manage extensions” in your Chrome-based browser (Google Chrome, Arc, Brave, etc)
- Enable developer mode (toggle in top right)
- Click on “Load unpacked extension”
- Navigate to the
build
directory of your Chrome extension project - Select the folder containing the extension’s compiled source and assets (e.g.
chrome-mv3-dev
orchrome-mv3-prod
)
Create a Link URL
Get the chromeExtensionId
of your extension from the “Manage Extensions” page (e.g. “chrome://extensions/”).
Developer Mode must be enabled to see the ID.
Example chrome extension ID.
Create a link url and set YOUR_CHROME_EXTENSION_ID
to the ID of your extension in the Manage Extensions
page.
Open the link url in your browser, and see that Anon Link recognizes that your custom extension has alreadybeen installed. Continue as normal to link the user’s account.
You’ve successfully used your own custom extension to link an account!
To release your extension to the public, and create link urls for real users, you must submit it to the Chrome Web Store.
Submit to the Chrome Web Store for Approval
Follow the Chrome Web Store guide for publishing your chrome extension. If you used the example extension template which uses the Plasmo browser extension framework, you can follow their guide for automated publishing as well.
Once your extension is approved, you must set the chromeExtensionId
parameter when creating your link urls to align with your new public extension ID.
For example, Anon’s public chrome extension ID is lbgbplnejdpahnfmnphghjlbedpjjbgd
. This can be found in the URL of the Chrome Web Store listing URL for your extension:
https://chromewebstore.google.com/detail/anon-link/lbgbplnejdpahnfmnphghjlbedpjjbgd
Permission Justification
To submit your extension to the Chrome Web Store, you must justify the permissions you are requesting.
Remove any permission that is unused in your extension, then give a short justification for each used permission. For example, the following justifications were used for the permissions required by the Anon Link Chrome Extension Library:
activeTab
“The extension uses the screen contents of the active tab to determine whether the user has finished logging in to their account.”
notifications
“The extension allows the user to optionally enable receiving push notifications for when an app they’re using needs to reconnect to a session they’ve previously shared.”
scripting
“The extension uses the scripting permission to run content scripts that save a user’s session for an online account. The user can then share access to that session with another app they use.”
cookies
“The extension uses the cookies permission to access cookies that are part of a user’s session with an account they would like to connect to another application.”
host permission
“The extension allows the user to share access to their online account for any host.”
Was this page helpful?