SetupSession
Defined in: packages/simply-settings-core/src/address/setupSession.ts:182
An authenticated browser-style session against an org’s Setup pages.
Methods
Section titled “Methods”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.
Parameters
Section titled “Parameters”pathOrUrl
Section titled “pathOrUrl”string
A path relative to the org’s instance URL, or an absolute URL.
Returns
Section titled “Returns”Promise<SetupResponse>
The final response.
postForm()
Section titled “postForm()”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.
Parameters
Section titled “Parameters”string | URL
The form’s action URL.
fields
Section titled “fields”[string, string][]
Name/value pairs, in order; a name may repeat.
Returns
Section titled “Returns”Promise<SetupResponse>
The response, with location set if it was a redirect.
open()
Section titled “open()”
staticopen(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.
Parameters
Section titled “Parameters”options
Section titled “options”The connection, plus an optional timeout and dispatcher.
Returns
Section titled “Returns”Promise<SetupSession>
The opened session.
Throws
Section titled “Throws”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.