Skip to content

SDK-2770 Support central auth token.#562

Open
abdalmajeed-yoti wants to merge 1 commit intodevelopmentfrom
SDK-2770-support-central-auth-token
Open

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

Conversation

@abdalmajeed-yoti
Copy link
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);

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.

1 participant