Skip to content

Login

@wuespace/telestion / auth / login

login(natsUrl, username, password): Promise<null | User>

Logs in a user with the given credentials.

Parameters

natsUrl: string

The url to connect to the NATS server.

username: string

The username for authentication.

password: string

The password for authentication.

Returns

Promise<null | User>

A promise that resolves once the user is logged in. The resolved value is the logged-in user object.

Throws

Error If the provided credentials are incorrect.