Skip to main content
GET
/
auth
/
connections
/
{id}
/
events
JavaScript
import Kernel from '@onkernel/sdk';

const client = new Kernel({
  apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});

const response = await client.auth.connections.follow('id');

console.log(response);
{
  "event": "<string>",
  "timestamp": "2023-11-07T05:31:56Z",
  "flow_status": "IN_PROGRESS",
  "flow_step": "DISCOVERING",
  "flow_type": "LOGIN",
  "discovered_fields": [
    {
      "name": "email",
      "type": "email",
      "label": "Email address",
      "selector": "input#email",
      "placeholder": "you@example.com",
      "required": true,
      "linked_mfa_type": "sms"
    }
  ],
  "mfa_options": [
    {
      "type": "sms",
      "label": "Text me a code",
      "target": "***-***-5678",
      "description": "We'll send a 6-digit code to your phone"
    }
  ],
  "pending_sso_buttons": [
    {
      "selector": "xpath=//button[contains(text(), 'Continue with Google')]",
      "provider": "google",
      "label": "Continue with Google"
    }
  ],
  "external_action_message": "<string>",
  "website_error": "<string>",
  "error_message": "<string>",
  "post_login_url": "<string>",
  "live_view_url": "<string>",
  "hosted_url": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The auth connection ID to follow.

Response

SSE stream of auth connection state updates.

Union type representing any managed auth event.

event
string
required

Event type identifier (always "managed_auth_state").

Allowed value: "managed_auth_state"
timestamp
string<date-time>
required

Time the state was reported.

flow_status
enum<string>
required

Current flow status.

Available options:
IN_PROGRESS,
SUCCESS,
FAILED,
EXPIRED,
CANCELED
flow_step
enum<string>
required

Current step in the flow.

Available options:
DISCOVERING,
AWAITING_INPUT,
AWAITING_EXTERNAL_ACTION,
SUBMITTING,
COMPLETED
flow_type
enum<string>

Type of the current flow.

Available options:
LOGIN,
REAUTH
discovered_fields
object[]

Fields awaiting input (present when flow_step=AWAITING_INPUT).

mfa_options
object[]

MFA method options (present when flow_step=AWAITING_INPUT and MFA selection required).

pending_sso_buttons
object[]

SSO buttons available (present when flow_step=AWAITING_INPUT).

external_action_message
string

Instructions for external action (present when flow_step=AWAITING_EXTERNAL_ACTION).

website_error
string

Visible error message from the website (e.g., 'Incorrect password'). Present when the website displays an error during login.

error_message
string

Error message (present when flow_status=FAILED).

post_login_url
string<uri>

URL where the browser landed after successful login.

live_view_url
string<uri>

Browser live view URL for debugging.

hosted_url
string<uri>

URL to redirect user to for hosted login.