@epilot/auth
Advanced tools
Comparing version 0.1.3 to 0.2.0
{ | ||
"name": "@epilot/auth", | ||
"version": "0.1.3", | ||
"version": "0.2.0", | ||
"description": "Authenticate with epilot APIs", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -17,4 +17,4 @@ # @epilot/auth | ||
```typescript | ||
import { authenticate, authorizeClient } from '@epilot/auth'; | ||
import { getClient } from '@epilot/entity-client'; | ||
import { authenticate } from '@epilot/auth'; | ||
import entityClient from '@epilot/entity-client'; | ||
@@ -25,5 +25,5 @@ const credentials = await authenticate({ | ||
}); | ||
credentials.configureClient(entityClient); | ||
const entityClient = await getClient() | ||
.then(authorizeClient(credentials)) | ||
await entityClient.createEntity('contact', { fist_name: 'Example', last_name: 'Contact' }); | ||
@@ -36,2 +36,1 @@ // entityClient will be authorized using epilot OAuth tokens | ||
https://docs.epilot.io/docs/auth/authentication | ||
20423
34