Setting Up the Example App
1. Initialize Your Vouch Identity Client
Create an instance of the Vouch Identity client or SDK in your server-side or admin-side code:
// Example: JavaScript/TypeScript
import { VouchClient } from 'vouch-identity-sdk';
const vouchClient = new VouchClient({
apiKey: 'YOUR_API_KEY',
// ...other configuration
});
2. Create an In-Person Enrollment Session
When an HR staff member is ready to onboard someone face-to-face, call the SDK to create a new enrollment session. This will return a unique enrollmentSessionId
and a QR code (often in the form of a data URL or image bytes).
const { enrollmentSessionId, qrCodeDataUrl } =
await vouchClient.createInPersonEnrollmentSession({
name: "John Doe",
email: "john.doe@example.com",
// Optionally include other metadata
});
3. Display the QR Code in Your Admin Interface
Show the qrCodeDataUrl
in your HR/admin application so the new user can scan it:
// For a web interface, you might do something like:
document.getElementById('qrCode').src = qrCodeDataUrl;
4. User Scans the QR Code with Their Device
The user opens the Vouch Identity mobile app (or a compatible QR scanner you’ve integrated).
- When they scan the code, the SDK securely associates that user’s device with the
enrollmentSessionId
. - In parallel, the HR staff verifies the individual’s physical ID (e.g., driver’s license) to confirm identity.
5. Confirm Enrollment
After you (HR/admin) have physically verified the user’s identity and the SDK has detected the device scan, finalize enrollment by confirming it:
await vouchClient.confirmInPersonEnrollment(enrollmentSessionId, {
verifiedBy: "Jane Smith (HR Admin)",
// Optionally include info about the verification, if needed
});
This step completes the process. Vouch Identity now recognizes the user, ties them to their new device, and officially adds them to your organization.
6. (Optional) Post-Enrollment Steps
You can further configure the new user’s permissions, roles, or groups using other methods in the Vouch Identity SDK:
await vouchClient.updateUserPermissions(userId, {
roles: ["employee", "standard_access"]
});
Summary
- Create Session: Call the SDK to initiate an in-person enrollment session, retrieving a unique QR code.
- Display QR: Show the QR code on your admin console for scanning.
- Physical Verification: HR staff checks the individual’s ID documents in person.
- Scan & Confirm: The user scans the code with their device, and you finalize the enrollment by confirming it in the SDK.
- Manage: Assign roles, set permissions, and manage the user’s account as needed.
This approach ensures a secure, face-to-face identity proofing process coupled with the convenience of a QR code scan to bind the new user’s device in real time.