@epilot/auth
Authenticate with epilot APIs
Quick Start
npm install --save @epilot/auth
import { authenticate } from '@epilot/auth';
import entityClient from '@epilot/entity-client';
const credentials = await authenticate({
username: 'email@example.com',
password: 'xxx',
});
credentials.configureClient(entityClient);
await entityClient.createEntity('contact', { fist_name: 'Example', last_name: 'Contact' });
CLI Usage
For convenience, you can quickly obtain a token for testing via the CLI
$ npx @epilot/auth
? Email email@example.com
? Password [hidden]
Documentation
https://docs.epilot.io/docs/auth/authentication