- 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 a Connection
A Managed Auth Connection associates a profile to a domain you want to keep authenticated so you can use the auth connection future browsers.2. Start a Login Session
Start a Managed Auth Session 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 20 minutes if not completed, and the flow times out after 10 minutes of waiting for user input.
5. Use the Profile
Create browsers with the profile and navigate to the site. The browser session will already be authenticated:Managed Auth Connections are generated using Kernel’s stealth mode. Use
stealth: true when creating authenticated browser sessions for the best experience.Complete Example
Adding Features
The basic flow above gets you started. Add these features as needed:Credentials and Auto-Reauth
Credentials are saved after every successful login, enabling automatic re-authentication when the session expires. One-time codes (TOTP, SMS, etc.) are not saved. To opt out of credential saving, setsave_credentials: false when creating the connection. See Credentials for more on automated authentication.
Custom Login URL
If the site’s login page isn’t at the default location, specify it when creating the connection:SSO/OAuth Support
Sites with “Sign in with Google/GitHub/Microsoft” are supported. The user completes the OAuth flow with the provider, and the authenticated session is automatically saved to the Kernel profile. Common SSO provider domains are automatically allowed by default, including Google, Microsoft/Azure AD, Okta, Auth0, Apple, GitHub, Facebook, LinkedIn, Amazon Cognito, OneLogin, and Ping Identity. You don’t need to add these toallowed_domains.
For custom or less common OAuth providers, add their domains to allowed_domains:
Updating a Connection
After creating a connection, you can update its configuration usingauth.connections.update:
login_url, credential, allowed_domains, health_check_interval, save_credentials, and proxy. Only the fields you provide will be changed. Changes to health_check_interval and proxy take effect immediately on the running connection workflow.
Post-Login URL
After successful authentication,post_login_url will be set to the page where the login landed. Use this start your automation from the right place: