Skip to content

SDK-2770 Support central auth token.#562

Open
abdalmajeed-yoti wants to merge 5 commits intodevelopmentfrom
SDK-2770-support-central-auth-token
Open

SDK-2770 Support central auth token.#562
abdalmajeed-yoti wants to merge 5 commits intodevelopmentfrom
SDK-2770-support-central-auth-token

Conversation

@abdalmajeed-yoti
Copy link
Copy Markdown
Contributor

@abdalmajeed-yoti abdalmajeed-yoti commented Mar 9, 2026

Adds OAuth2 Bearer token authentication as an alternative to the existing RSA signed-request authentication for the IDV client.

What's New

  • AuthTokenGenerator — Generates access tokens via OAuth2 client_credentials grant with PS384-signed JWT assertions.
  • IDVClient — New authToken option, mutually exclusive with sdkId/pem.

Usage

const { IDVClient, AuthTokenGenerator } = require('yoti');

// Generate an access token
const generator = new AuthTokenGenerator(sdkId, pemString);
const tokenResponse = await generator.generate(['idv:sessions']);

// Create IDV client with token auth
const idvClient = new IDVClient(null, null, { authToken: tokenResponse.getAccessToken() });

// Use as usual
const session = await idvClient.createSession(sessionSpec);

Signed-request auth continues to work unchanged:

const idvClient = new IDVClient(sdkId, pemString);

laurent-yoti and others added 5 commits February 2, 2026 12:25
… (still below 9 so that shall not fix security warning) and jest.

Updated in examples the version of express (4.22+) - and eslint too.
Added "--ignore-scripts" as flagged by SonarQube
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants