Link copied to clipboard!

Node.js

If you’re using Node.js on the server, this library will simplify writing the server-side portions of Cord.

Installation

Install the @cord-sdk/server package via npm.

npm install @cord-sdk/server

Signing client auth tokens

Usage

import { getClientAuthToken } from "@cord-sdk/server";

const clientAuthToken = getClientAuthToken(APP_ID, APP_SECRET, {
  user_id: user.id,
  organization_id: org.id,
  user_details: {
    email: user.email,
    name: user.name,
    profile_picture_url: user.profilePictureURL,
  },
  organization_details: {
    name: org.name,
  },
});

The payload should contain a valid body for a client auth token.

In this section