Skip to content

MQ37/sessioner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Sessioner logo

Sessioner

Export & import full browser sessions β€” cookies, localStorage, sessionStorage, IndexedDB β€” with automatic cross-domain discovery.


Sessioner is a Firefox extension that lets you clone your logged-in session from one browser to another. Export your account state on Browser A, import it on Browser B, and you're logged in without re-authenticating.

It passively monitors network requests to automatically discover related domains (APIs, CDNs, auth providers) so you never miss a cookie.


πŸ” What Gets Captured

Data Type Method Scope
πŸͺ Cookies browser.cookies API (includes httpOnly) Domain + all discovered subdomains
πŸ“¦ localStorage Content script Origin
πŸ“‹ sessionStorage Content script Origin
πŸ—„οΈ IndexedDB Content script (full schema + records) Origin

All data is saved as a single .json file.

πŸ“‘ Passive Domain Tracking

Most sites talk to multiple domains β€” APIs, auth servers, CDNs. Sessioner's DomainTracker passively monitors webRequest traffic to build a live map of every domain each site communicates with.

When you export, cookies are captured for all discovered domains, not just the one in your URL bar.

example.com β†’ api.example.com, auth.example-cdn.com, cdn.example.io, ...
  • πŸ”„ Learns automatically as you browse β€” no configuration needed
  • πŸ’Ύ Persisted across browser restarts (30-day TTL)
  • 🏷️ Visible in the popup as domain tags

πŸ“₯ Installation

⚠️ Requires a Firefox variant that allows unsigned extensions (e.g. Firefox Developer Edition, Firefox Nightly, or unbranded builds). Set xpinstall.signatures.required to false in about:config.

  1. Download the latest sessioner-*.zip from Releases
  2. Open Firefox β†’ about:addons (or Ctrl+Shift+A)
  3. Click the βš™οΈ gear icon β†’ "Install Add-on From File..."
  4. Select the downloaded .zip file

πŸš€ Usage

Export

  1. Navigate to the site you want to export
  2. Click the Sessioner icon in the toolbar
  3. Click Export Session β†’ saves a .json file

Import

  1. On another browser/profile, navigate to the same site
  2. Click Sessioner β†’ Import Session (opens a dedicated import page)
  3. Select or drag & drop the .json file
  4. Refresh the page β€” you should be logged in

βš™οΈ How It Works

Export Flow

Popup click β†’ Background script β†’
  1. Cookies: browser.cookies API for all discovered domains
  2. Storage: content script reads localStorage + sessionStorage
  3. IndexedDB: content script exports full schema + records
  4. Download: single .json file

Import Flow

Import page β†’ reads .json β†’ stores in browser.storage.local β†’
  Background script β†’
    1. Cookies: browser.cookies.set() per cookie
    2. Storage: content script writes localStorage + sessionStorage
    3. IndexedDB: navigate to clean page β†’ inject content script β†’
       import DBs with no lock conflicts β†’ navigate back

IndexedDB Lock Handling

Sites (especially SPAs) hold IndexedDB connections open. Sessioner handles this by:

  1. ↗️ Navigating the tab to a minimal same-origin page (releases all JS/IDB connections)
  2. πŸ’‰ Injecting the content script early (document_start)
  3. βœ… Running IDB import with zero competing connections
  4. ↩️ Navigating back to the original URL

Service worker databases (workbox-*) are automatically skipped β€” they're infrastructure, not user data.

πŸ” Security Warning

Exported session files contain sensitive authentication data (session tokens, cookies, API keys). Treat them like passwords.

  • ❌ Don't share export files publicly
  • πŸ—‘οΈ Delete them after use
  • ☁️ Don't store them unencrypted in cloud storage

πŸ”‘ Permissions

Permission Why
cookies Read/write cookies (including httpOnly)
tabs Get active tab URL, navigate for IDB import
activeTab Access current tab
downloads Save export file
storage Persist domain tracker + import data transfer
webRequest Passive domain discovery
<all_urls> Content scripts + cookie access on any site

πŸ› οΈ Development

# Lint with web-ext
npx web-ext lint --source-dir .

# Run in Firefox with auto-reload
npx web-ext run --source-dir .

Requirements: Firefox 109+ Β· Manifest V2 Β· No build step

πŸ“„ License

MIT

About

πŸ”’ Firefox extension to export & import browser sessions (cookies, localStorage, sessionStorage, IndexedDB) with πŸ“‘ automatic cross-domain discovery via passive request monitoring.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors