Browser Extension Setup
Configure the browser extension for custom domains, token flow, and host permissions in self-hosted deployments.
If you run Arivu on your own domain, the extension needs two updates:
- host permissions for your domain
- API URL pointing to your deployment
How Extension Auth Works
- You log into Arivu in your browser
- Extension content script calls
/api/auth/extension-token - Backend returns short-lived tokens
- Extension stores tokens in
chrome.storage.session - Save action uses those tokens to call
/api/bookmarks
1. Update Manifest Host Permissions
Edit extension/manifest.json in your cloned repo:
"host_permissions": [
"https://your-domain.example/*",
"http://localhost:8001/*"
],
"content_scripts": [
{
"matches": ["https://your-domain.example/*", "http://localhost/*"],
"js": ["content.js"],
"run_at": "document_idle"
}
]
Reload extension after saving.
2. Install / Reload Extension
Chrome
- Open
chrome://extensions/ - Enable
Developer mode - Click
Load unpacked - Select the
extension/directory in your cloned repo
If already installed, click Reload.
Firefox
- Open
about:debugging#/runtime/this-firefox - Click
Load Temporary Add-on - Select
extension/manifest.jsonfrom your cloned repo
3. Set Extension API URL
In extension popup:
- Open popup
- Click
Settings - Set API URL to
https://your-domain.example/api
This value is saved as apiUrl in chrome.storage.local.
4. Validate End-to-End
- Open your Arivu web app and sign in
- Open extension popup on any page
- Ensure URL and title are pre-filled
- Save bookmark and verify it appears in
/dashboard
Common Issues
Popup asks to log in repeatedly
- You are not logged in on the same browser profile
- Content script domain does not match deployment host
- API URL points to wrong origin
Save fails with unauthorized
- Session token expired; open Arivu and refresh login
- Verify
/api/auth/extension-tokenis reachable and proxied
Save fails on private/self-signed cert
- Browser may block mixed or untrusted requests
- Use trusted TLS certificate for production domains
Reference Files
extension/manifest.jsonextension/content.jsextension/popup.jsextension/README.md