
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@identistride/verify
Advanced tools
Identity verification component for React/Next.js applications with built-in consent management.
This is a commercial service. You need an API key to use this package.
npm install @identistride/verify
⚠️ Important: This package requires a paid API key. Sign up here.
The SDK requires a backend endpoint to create verification sessions securely.
// app/api/verify/create-session/route.ts
import { NextRequest } from "next/server";
export async function POST(request: NextRequest) {
const { consent } = await request.json();
// Get user ID from your auth system
const userId = "user_123"; // Replace with actual user ID
try {
const response = await fetch(
"https://api.identistride.com/v1/verify/session",
{
method: "POST",
headers: {
"X-Api-Key": process.env.IDENTISTRIDE_SECRET_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
externalId: userId,
consent, // Required: true or false
}),
}
);
if (!response.ok) {
const error = await response.json();
return Response.json(error, { status: response.status });
}
const session = await response.json();
return Response.json(session);
} catch (error) {
return Response.json({ error: "Session creation failed" }, { status: 500 });
}
}
// pages/api/verify/create-session.ts
import type { NextApiRequest, NextApiResponse } from "next";
export default async function handler(
req: NextApiRequest,
res: NextApiResponse
) {
if (req.method !== "POST") {
return res.status(405).json({ error: "Method not allowed" });
}
const { consent } = req.body;
const userId = "user_123"; // Get from your auth system
try {
const response = await fetch(
"https://api.identistride.com/v1/verify/session",
{
method: "POST",
headers: {
"X-Api-Key": process.env.IDENTISTRIDE_SECRET_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
externalId: userId,
consent,
}),
}
);
if (!response.ok) {
const error = await response.json();
return res.status(response.status).json(error);
}
const session = await response.json();
return res.json(session);
} catch (error) {
return res.status(500).json({ error: "Session creation failed" });
}
}
// routes/verify.ts
import express from "express";
const router = express.Router();
router.post("/create-session", async (req, res) => {
const { consent } = req.body;
const userId = req.user.id; // Get from your auth middleware
try {
const response = await fetch(
"https://api.identistride.com/v1/verify/session",
{
method: "POST",
headers: {
"X-Api-Key": process.env.IDENTISTRIDE_SECRET_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
externalId: userId,
consent,
}),
}
);
if (!response.ok) {
const error = await response.json();
return res.status(response.status).json(error);
}
const session = await response.json();
return res.json(session);
} catch (error) {
return res.status(500).json({ error: "Session creation failed" });
}
});
export default router;
The SDK handles consent UI and the entire verification flow automatically.
"use client";
import { VerificationFlow } from "@identistride/verify";
export default function VerifyPage() {
return (
<div className="container mx-auto p-4">
<VerificationFlow
onCreateSession={async (consent) => {
const response = await fetch("/api/verify/create-session", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ consent }),
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.message || "Failed to create session");
}
return await response.json();
}}
onComplete={(result) => {
console.log("Verification complete!", result);
// Redirect or show success message
}}
onError={(error) => {
console.error("Verification failed:", error);
// Show error notification
}}
/>
</div>
);
}
That's it! 🎉 The SDK will:
| Prop | Type | Required | Description |
|---|---|---|---|
onCreateSession | (consent: boolean) => Promise<VerificationSession> | ✅ Yes | Callback to create session via your backend |
onComplete | (result: VerificationResult) => void | ✅ Yes | Called when verification completes successfully |
onError | (error: Error) => void | No | Called when an error occurs |
className | string | No | Additional CSS class names |
interface VerificationSession {
sessionId: string;
providerId: string;
uploadUrls: {
documentFront: string;
selfie: string;
};
status: string;
expiresAt?: number; // Unix timestamp in milliseconds
}
interface VerificationResult {
providerId: string;
email: string;
name: string;
verificationStatus: "approved" | "rejected" | "pending" | "failed";
status: string;
result?: {
outcome: "approved" | "rejected" | "needs_review";
documentQuality: number;
fraudScore: number;
details?: {
documentType?: string;
country?: string;
firstName?: string;
lastName?: string;
dob?: string;
documentNumber?: string;
expiryDate?: string;
};
};
}
Before (V0):
const [session, setSession] = useState(null);
useEffect(() => {
fetch("/api/create-session", { method: "POST" })
.then(res => res.json())
.then(setSession);
}, []);
<VerificationFlow session={session} />
After (V1):
<VerificationFlow
onCreateSession={async (consent) => {
const res = await fetch("/api/create-session", {
method: "POST",
body: JSON.stringify({ consent })
});
return res.json();
}}
/>
Your backend must now include the consent field:
Before (V0):
body: JSON.stringify({
externalId: "user_123",
});
After (V1):
body: JSON.stringify({
externalId: "user_123",
consent: true, // or false
});
This change is for abuse management and doesn't affect UX (Rekognition API has its own timeout).
The SDK and backend API can return several error types:
When: consent field not provided in backend request
{
"error": "Missing required field: consent",
"message": "Must include consent field (true or false)"
}
Action: Ensure your backend sends consent: true or consent: false
When: User declines consent (consent: false)
{
"message": "Consent is required to start verification",
"consentRequired": true
}
Action: This is logged for audit. SDK shows error message automatically.
When: User tries to create a new session while one is active
{
"error": "Session already in progress",
"message": "An active verification session exists.",
"expiresInSeconds": 723
}
Action: Show error to user, suggest completing existing session
When: Too many verification attempts
{
"error": "Too many verification attempts",
"message": "Please try again later"
}
Action: Show friendly error, suggest trying tomorrow
When: Account has no credits left
{
"error": "Insufficient credits",
"message": "Please add credits to your account"
}
Action: Direct user to billing page
<VerificationFlow
onCreateSession={async (consent) => {
try {
const response = await fetch("/api/verify/create-session", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ consent }),
});
// Handle different status codes
if (response.status === 409) {
const error = await response.json();
const minutes = Math.ceil(error.expiresInSeconds / 60);
throw new Error(
`A verification is already in progress. Please wait ${minutes} minutes.`
);
}
if (response.status === 429) {
throw new Error(
"Too many verification attempts. Please try again tomorrow."
);
}
if (response.status === 402) {
throw new Error(
"Insufficient credits. Please add credits to continue."
);
}
if (!response.ok) {
const error = await response.json();
throw new Error(error.message || "Failed to create session");
}
return await response.json();
} catch (error) {
console.error("Session creation error:", error);
throw error;
}
}}
onComplete={(result) => {
if (result.result?.outcome === "approved") {
console.log("✅ Verification approved!");
// Handle success
} else if (result.result?.outcome === "rejected") {
console.log("❌ Verification rejected");
// Handle rejection
} else {
console.log("⏳ Manual review required");
// Handle pending state
}
}}
onError={(error) => {
console.error("Verification error:", error);
// Show user-friendly error notification
alert(error.message);
}}
/>
The component comes with default Tailwind-based styles. You can customize with the className prop:
<VerificationFlow
onCreateSession={createSession}
className="max-w-lg"
onComplete={handleComplete}
onError={handleError}
/>
For custom styling, you can override the default classes in your CSS.
The SDK shows users exactly what data is collected and why:
Never expose API keys in frontend code
Validate user authentication
Handle errors gracefully
This software is commercially licensed. See LICENSE.md for details.
Use requires an active IdentityStride subscription.
Made with ❤️ by IdentityStride | Website
FAQs
Identity verification component for React applications
We found that @identistride/verify demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.