Skip to content

lt.auth

lt.auth exchanges a username and password for a signed JWT. See Auth and SSO for the other ways a caller authenticates.

const result = await lt.auth.login({
username: 'jane.doe',
password: process.env.LT_PASSWORD,
});

Verify credentials against the user store and return a signed JWT carrying the user’s roles and highest privilege level. The token is valid for 24 hours.

Parameters

Field Type Required Description
username string Yes Login identifier (external_id)
password string Yes Plaintext password

Returns: LTApiResult<{ token, user: { id, external_id, display_name, roles } }>. 401 if the credentials are invalid.

Auth: Not required.