Function: login()
ts
function login(client, credentials): Promise<PrivateResponseJson>;Logs in with username and password. On success the session carries the user id and the authorization token, and is persisted if the client has a store. Two-factor, challenge and bad-password responses surface as typed errors.
Parameters
| Parameter | Type |
|---|---|
client | PrivateClient |
credentials | LoginCredentials |
Returns
Promise<PrivateResponseJson>