authenticateUser()
authenticateUser(
credentials:LoginCredentials):Promise<AuthTokens>
Defined in: packages/core/src/index.ts:186
Authenticate user with username and password
Parameters
| Parameter | Type | Description |
|---|---|---|
credentials | LoginCredentials | Login credentials containing username and password |
Returns
Promise<AuthTokens>
Authentication tokens (access_token, refresh_token)
Throws
401 - Invalid credentials
Example
import { authenticateUser } from "@cpod/sdk";
const tokens = await authenticateUser({
username: "user@example.com",
password: "password",
});