Skip to content

Commit 4251c70

Browse files
krish221997paulkr
andauthored
feat: update package (#40)
Co-authored-by: Paul K <[email protected]>
1 parent 953f485 commit 4251c70

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

packages/connections/README.MD

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,15 @@ import { AuthKitToken } from "@integrationos/authkit-node";
2525

2626
app.post("/authkit-token", async (request, response) => {
2727
const authKitToken = new AuthKitToken("sk_live_1234");
28-
29-
const token = await authKitToken.create({
30-
group: "org_123", // a meaningful identifier (i.e., organizationId)
31-
label: "Acme" // a human-friendly label (i.e., organizationName)
32-
});
28+
const token = await authKitToken.create();
3329

3430
response.send(token);
3531
});
3632
```
3733

3834
You'll want to switch out the API Key for your own, which will later tell your frontend which integrations you'd like to make available to your users.
3935

40-
You'll also want to populate the `group` and `label` fields depending on how you want to organize and query your users' connected accounts. The Group is especially important as it's used to generate the unique [Connection Key](https://docs.integrationos.com/docs/setup) for the user once they successfully connect an account.
36+
If you pass an `identity` or `identityType` (`user`, `team`, or `organization`), you'll be able to query for all connections scoped to that identity. The identity is used to generate the unique [Connection Key](https://docs.integrationos.com/docs/setup) for the user once they successfully connect an account.
4137

4238
## Full Documentation
4339

packages/connections/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@integrationos/authkit-node",
3-
"version": "1.1.1",
3+
"version": "1.2.0",
44
"description": "Secure token generation for IntegrationOS AuthKit",
55
"main": "dist/index.js",
66
"scripts": {

packages/connections/src/client/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ export class AuthKitToken {
3434

3535
async create(payload: {
3636
ttl?: number;
37+
/**
38+
* Unique identifier for the token.
39+
* @remarks It is recommended to avoid using spaces and colons in this field as it may lead to unexpected behavior in some systems.
40+
*/
3741
identity?: string;
3842
identityType?: "user" | "team" | "organization";
3943
/** @deprecated Use 'identity' instead */

0 commit comments

Comments
 (0)