Line

ui/client/features/auth/services/AuthLogin

Cockpit client (features), v0.9. Source: ui/client/features/auth/services/AuthLogin.ts.

Functions#

startGithubLogin()#

startGithubLogin(loginPath): void

Defined in: ui/client/features/auth/services/AuthLogin.ts:9

Start the real GitHub round trip. A full-page navigation, not a fetch: the flow ends in a redirect back from github.com, which an XHR cannot follow and which must land in the address bar to set the cookie.

Parameters#

loginPath

string

Returns#

void


testLogin()#

testLogin(): Promise<{ error?: string; ok: boolean; }>

Defined in: ui/client/features/auth/services/AuthLogin.ts:19

The e2e escape hatch (POST /auth/test-login). It mints an ordinary signed session for the server's configured CONSTRUCT_AUTH_TEST_USER; on any server that has not enabled it, this 404s. It is called from a real button on the login screen on purpose — the e2e suite then proves the real gate by genuinely logging in and holding a genuine cookie, rather than by a hidden hook the product code does not have.

Returns#

Promise<{ error?: string; ok: boolean; }>