npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@saxess-pro/client-auth

v1.0.1

Published

Saxess Pro OIDC CIBA Authentication SDK

Readme

@saxess-pro/client-auth SDK

The official Node.js SDK for integrating with the Saxess OIDC CIBA Authentication server.

Installation

npm i @saxess-pro/client-auth


Usage

  1. Initialization
    Initialize the client with your credentials. It is recommended to load the private key from a secure location or environment variable.
const { SaxessProAuth,  AuthorizationType, AuthorizationPurpose, AuthorizationAction, DeviceBinding } = require("@saxess-pro/client-auth");
const fs = require("fs");

const config = {
  authServerUrl: process.env.AUTH_SERVER_URL,
  clientId: process.env.CLIENT_ID,
  clientName: process.env.CLIENT_NAME, 
  privateKey: fs.readFileSync("./private_key.pem", "utf8"),
};

const sdk = new SaxessProAuth(config);
  1. Start Authentication
    Initiate the CIBA flow by providing the user's email.
const auth = await sdk.startAuthentication({
  email: "[email protected]",
  authorizationDetails: {
        type: AuthorizationType.BIOMETRIC_ASSERTION,
        purpose: AuthorizationPurpose.SECURE_LOGIN,
        actions: [AuthorizationAction.AUTHENTICATE],
        deviceBinding: DeviceBinding.NFC_CARD,
  }
});

console.log("Auth Request ID:", auth.authReqId);
console.log("Poll Interval:", auth.interval);
  1. Poll for Status
    Check if the user has completed the authentication on their device.
const result = await sdk.pollAuthentication(auth.authReqId);

if (result.status === "AUTHENTICATED") {
  console.log("Access Token:", result.tokens.accessToken);
  
  // Verify and decode the ID Token
  const user = await sdk.verifyIdToken(result.tokens.idToken);
  console.log("Verified User:", user.email);
}
  1. Refresh Tokens
    Rotate your access tokens using a refresh token.
const refreshed = await sdk.refreshTokens(result.tokens.refreshToken);
console.log("New Access Token:", refreshed.accessToken);

Security Features

  1. JWS Signing:
    Automatically generates RS256 signed client assertions for all requests.

  2. Request Objects:
    Encapsulates CIBA parameters in a signed JWT to ensure integrity.

  3. PASETO Verification:
    Native support for verifying V2 PASETO ID tokens with JWKS public key fetching and local caching.

API Reference

Method | Parameters | Description ------------ | ------------ | ------------ startAuthentication | StartAuthInput | Initiates the CIBA authorize request. pollAuthentication | authReqId: string | Checks the status of a pending request. verifyIdToken | idToken: string | Verifies a PASETO token and returns the payload. refreshTokens | refreshToken: string | Exchanges a refresh token for new credentials.

Try the SDK locally

You can try the SDK by cloning the repository and running the example script.

git clone https://github.com/himanshu-serenity/saxess-pro-sdk
cd saxess-pro-sdk
npm install

Generate a private key : openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out private.key

Create a .env file:

   PORT=4000
   AUTH_SERVER_URL=https://pro-be.s.technology/api
   CLIENT_ID=***
   CLIENT_NAME=***
   PRIVATE_KEY_PATH=./private.key

Run the example: 

npx ts-node examples/try-sdk.ts