Installation
Get the VECU IDV Web SDK installed and configured in your project.
Package Installation
Choose your preferred package manager:
npm install vec-idp-web-sdk
yarn add vec-idp-web-sdk
pnpm add vec-idp-web-sdk
CAI Artifactory Configuration
The SDK is hosted in Cox Automotive's Artifactory registry. You'll need to configure npm to access it.
Authentication Required
You must have CAI Artifactory credentials to install the SDK. Contact your team lead if you don't have access.
Step 1: Configure npm Registry
Create or update your .npmrc file in your project root:
@vecu:registry=https://cai.jfrog.io/artifactory/api/npm/npm-release-local/
//cai.jfrog.io/artifactory/api/npm/npm-release-local/:_authToken=${ARTIFACTORY_TOKEN}
Step 2: Set Environment Variable
Set your Artifactory token as an environment variable:
export ARTIFACTORY_TOKEN=your-token-here
Or add it to your CI/CD pipeline's secret environment variables.
Step 3: Install the Package
Now you can install the SDK:
npm install vec-idp-web-sdk
CDN / UMD Bundle
For quick prototyping or non-bundled projects, you can use the UMD bundle:
<script src="https://unpkg.com/vec-idp-web-sdk/dist/vecu-idv-sdk.bundle.js"></script>
<script>
// SDK is available as window.VecuIDVSDK
VecuIDVSDK.configure({
deploymentStage: 'sandbox',
bearerToken: 'your-bearer-token',
});
</script>
The UMD bundle includes all dependencies and is suitable for browser environments without a build system.
TypeScript Support
The SDK includes TypeScript definitions out of the box. No additional @types packages are needed.
import { createVecuIDVSDK, VecuIDVSDKConfig } from 'vec-idp-web-sdk';
const config: VecuIDVSDKConfig = {
deploymentStage: 'sandbox',
bearerToken: 'your-token',
debug: true,
};
const sdk = createVecuIDVSDK(config);
Verification
Verify your installation by creating a simple test:
import { createVecuIDVSDK } from 'vec-idp-web-sdk';
const sdk = createVecuIDVSDK({
deploymentStage: 'sandbox',
bearerToken: 'test-token',
debug: true,
});
console.log('SDK initialized:', sdk);
If you see the SDK object logged without errors, the installation was successful.
Next Steps
- Configuration - Learn about SDK configuration options
- Quick Start - Build your first verification flow
- Authentication - Set up OAuth and get your bearer token