API client for the IDkollen REST API. Ships ESM and CJS bundles with full type declarations.
npm install @idkollen/client
import { IdkollenClientBuilder, BankIdSeAuthRequest, PollOptions } from "@idkollen/client";
const client = new IdkollenClientBuilder("client_id", "client_secret")
.environment("staging")
.build();
const session = await client.bankidSe().auth(new BankIdSeAuthRequest());
const result = await client
.bankidSe()
.waitForAuth(session.id, new PollOptions());
console.log(result);
To build the project, simply issue the following command:
$ npm run build
$ npm run check
$ npm run lint
$ npm run test