Skip to content

SetupSession

Defined in: packages/simply-settings-core/src/address/setupSession.ts:182

An authenticated browser-style session against an org’s Setup pages.

get(pathOrUrl): Promise<SetupResponse>

Defined in: packages/simply-settings-core/src/address/setupSession.ts:255

GETs a Setup page, following redirects: HTTP ones, and Salesforce’s redirectOnLoad() script interstitials, which a browser follows too.

string

A path relative to the org’s instance URL, or an absolute URL.

Promise<SetupResponse>

The final response.


postForm(url, fields): Promise<SetupResponse>

Defined in: packages/simply-settings-core/src/address/setupSession.ts:283

POSTs a form as application/x-www-form-urlencoded, without following any redirect — a Visualforce postback signals success through where it redirects to.

string | URL

The form’s action URL.

[string, string][]

Name/value pairs, in order; a name may repeat.

Promise<SetupResponse>

The response, with location set if it was a redirect.


static open(options): Promise<SetupSession>

Defined in: packages/simply-settings-core/src/address/setupSession.ts:204

Opens a session by presenting the connection’s access token as the sid cookie — the CLI’s own cached session — then confirms the session actually reaches Setup.

A frontdoor (/services/oauth2/singleaccess) login isn’t used: it starts a new UI session, which Salesforce can hold at a passkey or MFA registration prompt even when the user’s browser session gets straight through.

OpenSetupSessionOptions

The connection, plus an optional timeout and dispatcher.

Promise<SetupSession>

The opened session.

SfError (SetupSessionError) when the org answers with a login page — typically an OAuth token without the web or full scope — or holds the user at an identity check.