@identisure/client
    Preparing search index...

    Identisure JavaScript/TypeScript Client

    npm Downloads Documentation MIT license

    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.

    • BankID SE: auth, sign, phone auth and sign, QR verify, age verification
    • BankID NO: auth, backchannel auth, sign, age verification
    • Freja eID: auth, backchannel auth, sign, backchannel sign, age verification
    • MitID: auth, backchannel auth, sign, age verification
    • FTN (Finnish Trust Network): auth, age verification
    • Vipps MobilePay: auth, backchannel auth
    • Documents: upload and download documents for signing
    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.

    C#, Dart, Go, Java/Kotlin, PHP, Python, Ruby, Rust, Swift