Reference
Migrating from Privy
The API is intentionally shaped like @privy-io/node: a client class with verifyAccessToken, a standalone verifyAccessToken({ token, appId, verificationKey }) function, and linkedAccounts on the resolved user in Privy’s shape. Two things do differ:
- User ids. Decane’s
uidis a plain UUID, not adid:privy:…. Rows keyed by a Privy id will not match a Decaneuid— map legacy ids during a re-auth window before cutting production over. - No app secret. Privy’s client wants an app secret for some calls; Decane verification is public-key only. The dashboard’s verification key is a public key — it is not sensitive, though keeping it in env config is still tidy.
ts
// Before — @privy-io/node
import { PrivyClient } from "@privy-io/node";
const privy = new PrivyClient({ appId, appSecret });
const claims = await privy.utils().auth().verifyAccessToken({ access_token, verification_key });
// After — decane-node
import { verifyAccessToken } from "decane-node";
const claims = await verifyAccessToken({ token, appId, verificationKey });