Sessions
Some pages sit behind a login. Capture yours once in a real browser window; Magpie reuses it and tells you when it expires.
On this page
Capture a login
- Open Settings → Sessions. Enter the login URL — for example
https://github.com/login. - Press Log in to a site. A real browser window opens at that URL with a capture bar along its bottom.
- Do the login yourself — password, 2FA, SSO, CAPTCHA all work, because a human does them. Tick remember me or trust this device so the session lasts.
- The bar’s button reads Capture now while you are on the sign-in form, and flips to Save session once a sign-in is detected. Press it when you are all the way in — after any code or phone prompt.
The window closes on save, or after a five-minute timeout if the login never completes. Nothing is saved until you press the button — a press while the sign-in form is still showing is refused (nearly every sign-in page hands out anonymous CSRF cookies), and after that refusal the button reads Save anyway for exactly the odd flows — an SSO landing with no form — where that is the right call.
The capture’s scope is the login URL’s site: a login that starts at login.example.com and lands on example.com or app.example.com saves as one session for example.com, and a press while the window is on some other site is refused with the domain it wants you back on.
Magpie never types, clicks or solves anything in that window. Each capture starts from a fresh, logged-out profile.
What is stored
The session’s cookies — sealed, either in the OS keychain or as an encrypted sessions.json beside config.yaml, whichever this desktop offers. The Sessions table lists each one — domain, status, capture time, last use — and the cookie count at capture. Values are never displayed, never decrypted for the UI, and never leave the machine.
Delete a row and the session is gone. There is no cloud copy, because there is no cloud.
Using sessions
A scrape whose URL matches a captured domain attaches the session automatically — the address bar shows a session ✓ badge so you know before you run it. Research runs can read specific domains with your login: pick them under Read with my login in the Advanced drawer. The first use of each domain asks for a one-time acknowledgement of the terms — read-only, one page every 10 seconds per site, pages stored on this machine, each site’s terms apply to you.
When they expire
Sites end sessions; Magpie notices for you. The Sessions row shows an expired badge once an attached scrape hits an auth wall — the same scrape shows Session expired for <host> with a Re-login button that opens a fresh capture window. An expired login used by research reads like a logged-out visit; re-login first for full content.
Two details worth knowing:
- An expired session still attaches — the scrape runs, and the badge is how you learn the jar died, not a refusal.
- The badge clears only when a scrape rides that session and gets through cleanly. A rescued scrape leaves it on.
Login scripts. For a site whose login can’t be captured by hand — a rotating code, a short-lived cookie — you can write a per-domain script in the actions DSL: one line per browser action, in a plain-text file named <host>.actions inside an actions folder beside config.yaml (see Data and cache). When an attached scrape hits an auth wall and no capture window is open, Magpie runs that domain’s script once — in a real browser render, your typed text included — and rides the fresh login for that scrape. The script’s jar is not saved back into the store; the row stays expired until you capture again. Magpie never writes this file and never logs its contents.
For one-off needs, the Scrape screen’s Advanced drawer still takes Cookies by hand (a=b; c=d), and CDP endpoint can drive a browser you already logged into. Sessions are the durable version of both.