SDKs / Server

Node

TypeScript
@identra/node

Verify access tokens locally (EdDSA via cached JWKS) and call the API with your secret key.

Install

pnpm add @identra/node

Verify a token

ts
import { IdentraServer } from "@identra/node";

const identra = new IdentraServer({
  baseUrl: "http://localhost:8080",
  applicationId: process.env.IDENTRA_APP_ID!,
  apiKey: process.env.IDENTRA_API_KEY,   // optional; only for API calls
});

// In your auth middleware:
const claims = await identra.verifyToken(req.headers.authorization ?? "");
// claims.sub (user), claims.sid (session), claims.aal, claims.org, claims.org_role

Management calls

Provide `apiKey` to call the management API server-side. `verifyToken` throws `IdentraError("unauthorized")` on an invalid or wrong-tenant token.

ts
const user = await identra.createUser({ primary_email: "a@b.com" });

API

IdentraSerververifyToken()createUser()IdentraError