How Deck Handles MFA for AI Browser Agents
MFA is the part of an automated login that adds the most friction, or outright stalls your run, because it’s a step designed around sending a person on a fetch quest.
It’s also trickier to handle than it looks. MFA comes in many forms, from codes sent by text or email to push approvals, email links and security questions. Most browser agent providers treat MFA as a single code to pass along, or hand your user a live browser, and leave you to design and build the experience your users get around it.
That’s why we’ve built Deck to handle MFA in four layers: avoid triggering it at all, anchor logins to the last trusted session, automate the answer where we can and ask users properly when they really need to be involved.
| Layer | Who gets interrupted | What Deck does |
|---|---|---|
| Avoid | Nobody | Keeps each login looking like the same user: multiple steps chained across one session, one run at a time, with a consistent profile. |
| Anchor | Nobody, while the portal trusts the device | Saves browser and device trust between runs. |
| Automate | Nobody, after setup | Answers checks on your user’s behalf, like security questions. |
| Ask | Your user, briefly and at a good time | Shows your user the prompt in the portal’s own words, inside your product, and keeps scheduled runs from prompting anyone at a bad time. |
Avoid: Don’t trigger the check
The best way to handle an MFA challenge is to never trigger it in the first place.
Portals don’t ask for a second factor at random. When a browser agent signs in fresh for every task, from whatever IP address happens to be free, it looks a lot like an unwanted visitor trying to break in.
Deck is built around consistency, to make each login look like the same person signing in from the same device.
- One login for a whole workflow. Several sign-ins in a row are one of the quickest ways to get a portal’s attention. When a job requires the agent to perform several tasks, Deck signs in once and runs them all in the same session.
- One run at a time on each credential. Several sign-ins at once are just as suspicious. When separate runs use the same credential, Deck queues them and runs them one after another, reusing the same session.
- The same country. With credential geolocation, every run on a credential gets an IP address in the country you choose, so a user who lives in Montréal doesn’t suddenly appear to sign in from Ohio. Or vice versa.
- The same device. Each credential keeps a consistent device profile, so the portal sees the machine it saw last time.
- Login details on file. Some portals want a PIN or an account number alongside the password. Save those as source fields on the credential and the agent fills them in, instead of turning them into one more question for your user.
Anchor: Start from the last trusted session
Every time you clear your cookies, the sites you use every day start asking for codes again. Your browser was the thing they recognized to let you in. An agent that starts each run from a clean browser has the same problem on every run.
With credential persistence, Deck saves the login state after a successful sign-in, including the browser and device trust the portal handed out, and restores it on the next run. If the portal honors it, your agent skips the login, and the MFA prompt along with it.
If it doesn’t, the run signs in fresh and the next layers take over.
Automate: Answer on your user’s behalf
Some portals will ask for a second factor no matter how familiar the login looks. When that happens, the next best thing is to answer without bothering anyone.
With managed interactions, Deck answers checks itself and the run continues without pausing.
At the moment, this covers security questions. You can save the answers up front if you own the account, or let Deck keep the ones your user gives the first time each question comes up. If a portal ever rejects a saved answer, Deck stops using it and passes the question back to your user, rather than guessing its way into a locked account.
And when it’s impossible not to ask, we make sure it’s done the right way.
Ask: When only your user can answer, ask properly
Some checks really do need your user. For these, our job is to make the question easy to answer, which means asking it clearly and asking at the right moment.
Asking clearly starts with knowing exactly what the portal wants.
Deck tells you what the portal is asking for, in a form you can display, at any step of any task.
That covers more ground than people expect: depending on the portal, your user might need to type a code, choose where the code gets sent, approve a push notification, paste a link from an email, answer security questions or pick which account to open. Each of these arrives as its own kind of prompt, in the portal’s own words, with the exact fields to collect.
You can build that form from the fields Deck sends, or drop in one of Deck’s components.
The Auth Component handles MFA prompts while your user is adding their login, and the Live View Component shows them during a run that’s already going, including when you bring a user back later. Either way, your user answers inside your product and never hits a generic error.
Asking at the right moment matters just as much.
The best moment to ask is when your user is already there.
As soon as they connect an account, Deck can sign in once to confirm the login works. If the portal asks for a code along the way, your user answers it on the spot, and the runs that follow can happen in the background.
The flip side is knowing when not to ask.
Scheduled runs often happen when nobody’s around to answer. For those, you can suppress interactions: if the portal asks for a code, the run stops right away and your user never gets a prompt. The credential stays valid, so you can bring your user back at a better time and run it again.
The big picture
Agents are good at running tasks. But even the fastest, cheapest and most accurate agents don’t get the job done if they are stalled waiting for input in portals designed for human operators.
Deck approaches MFA as part of a broader set of interactions: any point in a run where a website asks for something the agent can’t supply on its own, whether that’s a code, a push approval, an email link, a security answer or a choice between accounts.
They all go through one engine under the hood that keeps logins consistent so fewer checks fire, reuses trusted sessions, answers what it can, caps retries before an account locks, and passes the rest to your user as a typed prompt in the portal’s own words.
Ready to get started?
See how Deck can connect your product to any system — no APIs needed.
Build my Agent →