- You need users to provide their credentials
- You want the simplest integration with minimal code
- You want Kernel to handle 2FA and multi-step login flows
Getting started
1. Create an Auth Agent
An Auth Agent represents a login session for a specific website and profile.2. Start Authentication
Create an invocation to get the hosted login URL.3. Collect Credentials
Send the user to the hosted login page:- See the login page for the target website
- Enter their credentials
- Complete 2FA if needed
4. Poll for Completion
On your backend, poll until authentication completes:Poll every 2 seconds. The session expires after 5 minutes if not completed.
5. Use the Profile
Create browsers with the profile and navigate to the site—the session is already authenticated:Use
stealth: true when creating browsers for authenticated sessions.Complete Example
Adding Features
The basic flow above gets you started. Add these features as needed:Save Credentials for Auto-Reauth
Capture the user’s credentials during login so future sessions can re-authenticate automatically when the session expires:Custom Login URL
If the site’s login page isn’t at the default location, specify it when creating the agent:SSO/OAuth Support
For sites with “Sign in with Google/GitHub/Microsoft”, add the OAuth provider’s domains toallowed_domains:
Post-Login URL
After successful authentication, retrieve the auth agent to getpost_login_url—the page where the login landed. Use this to start your automation from the right place:

