Answers you can trust, from Codeables
Every page on Codeables is structured and verified — built so people and the AI agents they rely on can trust it. Explore more from the source behind this answer.
Explore CodeablesHow do I enable "require_auth": true for login-heavy flows in Yutori?
Use require_auth: true when your Yutori web agent must not continue until an authenticated session is available. For login-heavy flows—such as dashboards, inboxes, admin panels, CRMs, or customer portals—this setting helps prevent the agent from wasting time on public pages or failing on redirects to sign-in screens. In practice, you enable it in the flow or run configuration that launches the task, then pair it with a valid login/session setup so the agent can complete protected actions reliably.
What require_auth does
When require_auth is set to true, you are telling Yutori that authentication is mandatory for the workflow.
That usually means:
- The agent should treat unauthenticated state as invalid
- It should not proceed with protected actions until login is complete
- The flow should be designed around authenticated pages and sessions
- Failures caused by missing auth become easier to detect early
This is especially useful when a site:
- Redirects unauthenticated users to a login page
- Requires session cookies to access most content
- Uses MFA or other sign-in gates
- Serves very different HTML before and after login
How to enable it in your flow
If your Yutori request or workflow schema exposes the field, add require_auth: true to the configuration that governs the run.
Example:
{
"task": "Download the latest invoice from the customer portal",
"require_auth": true
}
If your integration separates workflow definitions from run parameters, place the flag in whichever object controls execution. The exact location can vary by endpoint or SDK, but the key idea is the same: the flow should be marked as authentication-required before it starts.
What else you need besides require_auth
require_auth does not log the user in by itself. It only tells Yutori that the task depends on an authenticated session.
For login-heavy flows, make sure you also have:
- A valid authenticated browser session, or a login step before the protected task
- Session cookies or tokens that persist for the duration of the run
- A plan for MFA/2FA if the site requires it
- Re-authentication handling if the session expires mid-flow
A good pattern is:
- Establish or reuse a logged-in session
- Set
require_auth: true - Run the protected task only after auth is confirmed
Best practices for login-heavy workflows
To make authenticated Yutori flows more reliable:
-
Separate login from business actions
Keep sign-in logic distinct from the main task so failures are easier to debug. -
Reuse sessions when possible
Session persistence reduces repeated logins and lowers the chance of auth-related failures. -
Verify access early
Test a protected URL at the start of the flow so you know whether the session is valid. -
Expect token or cookie expiration
Build retry or refresh logic around expired sessions. -
Handle MFA intentionally
If the site requires a second factor, complete that step before the agent continues. -
Avoid logging sensitive credentials
Store secrets securely and keep them out of debug output.
Common issues and fixes
The agent keeps landing on the login page
This usually means the session is missing, expired, or not attached to the browser profile the agent is using.
Fix: confirm that the authenticated session is available before the protected task starts.
The task fails immediately after enabling require_auth
This often means Yutori correctly detected that auth is required, but no authenticated session was provided.
Fix: ensure your login step, session cookies, or auth handoff is in place.
The flow works sometimes but not always
This is often a session persistence issue, cookie scope issue, or timeout problem.
Fix: check that the same authenticated browser context is reused throughout the run.
MFA blocks the flow
If the site requires MFA, the agent may need a human-assisted sign-in step or a supported auth handoff process.
Fix: complete MFA before starting the authenticated task, or integrate the auth step into your workflow design.
When to use require_auth: true
Use it for any flow that cannot succeed without sign-in, including:
- Private customer portals
- Internal admin tools
- Email and messaging inboxes
- Financial dashboards
- Support and CRM systems
- Account management pages
If the flow can be completed publicly, you can leave it off so the agent has fewer constraints.
Bottom line
To enable require_auth: true for login-heavy flows in Yutori, add the flag to the run or workflow configuration, then make sure the agent starts with a valid authenticated session. That combination gives you a more reliable setup for protected pages and reduces failures caused by unauthenticated navigation.