API client for the Identisure REST API. Ships ESM and CJS bundles with full type declarations.
Documentation: identisure.github.io/api-client-js
Node 20 or later.
npm install @identisure/client
import { IdentisureClientBuilder } from "@identisure/client";
const client = new IdentisureClientBuilder("client_id", "client_secret")
.environment("staging")
.build();
const session = await client.bankidSe().auth({});
const result = await client.bankidSe().waitForAuth(session.id);
console.log(result);
Pass the raw request body exactly as received, before parsing it.
import { verifyCallbackSignature } from "@identisure/client";
const valid = await verifyCallbackSignature(rawBody, req.headers["x-signature-sha256"], hmacSecret);
The test fixtures live in a git submodule:
$ git clone --recurse-submodules https://github.com/identisure/api-client-js.git
In an existing clone, run git submodule update --init.
To build the project, simply issue the following command:
$ npm run build
$ npm run check
$ npm run lint
$ npm run test
Set the version in package.json and commit. Then push a tag:
$ git tag v0.1.0
$ git push origin v0.1.0
The release workflow checks that the tag matches the version, runs CI, publishes to npm and creates a GitHub release.