Scalebrowser

Magic link login for an AI agent: 1 inbox, 60 seconds

How an AI agent completes a magic link login: read its own inbox for up to 60 seconds, open the link in the profile that asked, never see the address.

Davide Valli · Founder, Scalebrowser

Published Nov 16, 2026 · 5 min read

Short answer

An AI agent completes a magic link login by reading its own inbox and opening the link in the same profile that requested it. The read waits up to 60 seconds and lists up to 25 recent messages; the link is then opened by its number, so the agent never sees the address, which is the account. The profile matters because Auth0 documents that request and click must happen in the same browser. We learned the inbox half the hard way: on 31 August 2026 a sign-in sent only a link, and our agent could not reach it until the release of 1 September.
60 s, reading its own inbox, beside a post box with a letter slot

Your agent typed an email address, pressed "Continue" and got a page that says "check your inbox". There is no code field and no password field, only a link on its way to an address. A person would open the mail on the same laptop and click. An agent needs the same two things: an inbox that belongs to its profile, and a way to open the link inside that profile without ever holding it.

A magic link login is a passwordless sign-in in which the site mails a one-time address to the account's email, and whoever opens that address is signed in. Ping Identity defines it as "a passwordless login method that verifies a user's identity by sending a unique, one-time-use URL to their email address". It sits beside the emailed code, and the two ask different things of an agent.

StepEmailed codeMagic link
What arrivesa short code in the subject or bodya one-time sign-in address
What the agent doestypes the code into the pageopens the address in its browser
Who ends up signed inthe browser where the code was typedthe browser that opened the link

The last row is the whole difficulty. A code can be read anywhere and typed in the right place, while a link signs in whatever opens it.

The link must open in the same profile because sign-in services such as Auth0 tie the sign-in to the browser that asked for it. Auth0's magic link documentation states that with Classic Login "both the initial request and its response must take place in the same browser or the transaction will fail". Opened elsewhere, the link either fails or signs in a browser that is not the agent's profile.

ProviderWhat its documentation says
Auth0request and response "must take place in the same browser"
Supabasea user can request a link "once every 60 seconds", and links "expire after 1 hour"
Ping Identitylinks "typically have a short expiration window (often 10-15 minutes)" and are "invalidated immediately after use"
Source: Auth0, Supabase and Ping Identity documentation on magic links, read 27 September 2026

Two practical rules follow from this table. Request the link only once and wait for it, because a second request can invalidate the first and Supabase refuses one within 60 seconds anyway. And open it within minutes, in the profile that requested it.

An agent opens a magic link from email with two tool calls: one that waits for the message in its own inbox, and one that opens a link from that message in the profile's own tab.

The agent reads its own inbox, waiting up to 60 seconds over the 25 latest messages, and opens the link by its number in the profile that requested it, so it never sees the address.
  1. Bind an address to the profile. Each profile gets its own address, usually minted under a domain with a catch-all, so no other profile's mail arrives in its read.
  2. Request the link in the profile. The agent enters that address on the site and submits, in the same browser that will open the link.
  3. Wait for the message. read_inbox waits up to 60 seconds and returns up to 25 recent messages, each with its age and the text and host of every link in it.
  4. Open the link by number. inbox_open_link takes the message id and the link's number and opens it in the bound tab.
  5. Read the page. The agent takes a snapshot and checks that it is now signed in.
json
{ "name": "read_inbox", "arguments": { "handle": "h_1", "timeout_ms": 60000, "subject_contains": "sign in" } }
{ "name": "inbox_open_link", "arguments": { "handle": "h_1", "message_id": "m_42", "link": 0 } }

The address itself never reaches the agent. A sign-in link is the account for as long as it is valid, so it is used and not read, and the agent chooses by the link's text and host. The message is looked up again when the link is opened, so a message that has left the time window answers that it is gone instead of opening something stale. The inbox page of the documentation shows how a mailbox is set up and bound.

Scalebrowser

Scalebrowser runs real browser profiles on your own PC: your AI agent drives them over MCP and signs in without ever seeing a password.

Download free

What went wrong the first time?

The first time, our agent could not complete a magic link login at all. On 31 August 2026 a sign-in at claude.ai sent a fresh address nothing but a link, even though the page offered a field for a code. Our inbox reader turned each mail into plain text for code detection and dropped every link address on the way, so the agent received the word on the button and nothing it could open. The run finished only because the message was read by hand on the mail server.

DateWhat happened
31 August 2026sign-in sends only a link; the agent receives text without an address
1 September 2026release 0.8.0 adds opening a link by its number, address hidden

At two other sites on the same day a code stood next to the link, which is why the gap had not shown before. The inbox answers two of the walls before a signed-in session, the emailed code and the magic link; the second factor and the passkey are answered from secrets stored in the profile.

What if the site sends a code instead?

If the site sends a code, the same read answers it: read_inbox lists every value that could be the code, strongest first, with the words around it, and the agent types it into the field the page shows. Some sites send both in one mail, as the two others did on 31 August, and the agent takes whichever the page asks for.

Filed in Sign in, one of 7 articles

Real browser profiles for your AI agent, on your PC.

Each profile keeps its own identity, logins and proxy. Your agent drives it over MCP and signs in without seeing a password.

Download free for Windows

Free plan with 3 profiles · No credit card · Runs on your PC

Written by

Davide Valli

Founder, Scalebrowser

Builds Scalebrowser, browser automation for the agentic era that runs on your own machine. Measures every change a web page could observe against a real browser before it ships, and writes up the ones that turned out wrong.

All articles by Davide Valli

More in Sign in