Migrating to @zewstid/id-*
@zewstid/id-*Audience: anyone who imports
,@zewstid/nextjs,@zewstid/node,@zewstid/react, or@zewstid/react-native. Effort: 5 minutes per project.@zewstid/events
In May 2026, the runtime SDKs were renamed with an
id-@zewstid/cal-*@zewstid/mail-*@zewstid/profile-*| Old | New |
|---|---|
@zewstid/nextjs | @zewstid/id-nextjs |
@zewstid/node | @zewstid/id-node |
@zewstid/react | @zewstid/id-react |
@zewstid/react-native | @zewstid/id-react-native |
@zewstid/events | @zewstid/id-events |
No API changes. Imports keep working with a one-line rename in
package.jsonThe 3-step migration
Step 1 — Authenticate with npm
These packages are private to the
@zewstid# One-time per machine npm login --scope=@zewstid --registry=https://registry.npmjs.org/
For CI / automation, set
NPM_TOKEN.npmrc//registry.npmjs.org/:_authToken=${NPM_TOKEN}
Heads-up: if you've previously been authenticating against
(the private Verdaccio), you can drop that. The new packages live on the public registry but are gated by org membership.npm.zewstid.com
Step 2 — Update package.json
package.jsonReplace the dep names. No version bump required — the new packages continue the same version line:
"dependencies": { - "@zewstid/nextjs": "^0.9.7", + "@zewstid/id-nextjs": "^0.9.7", - "@zewstid/events": "^0.1.0" + "@zewstid/id-events": "^0.1.0" }
If you're on an old version (
^0.9.0^0.7.1Step 3 — Reinstall
rm -rf node_modules package-lock.json npm install
That's it. Imports inside your codebase don't change —
@zewstid/id-nextjscreateZewstIDAuthEmbeddedSignInUserButtonWhat you get along with the rename
The rename shipped with two substantial new features. They're already in the new packages — just adopt at your own pace.
1. User-scoped API keys
Your app can now issue API keys to its end users via ZewstID instead of building your own key infrastructure.
// Server-side — issue a key for the signed-in user import { getServerSession } from 'next-auth/next'; import { getUserApiKeysClient } from '@zewstid/id-nextjs/server'; export async function POST(req: Request) { const session = await getServerSession(authOptions); const { name, scopes } = await req.json(); const keys = getUserApiKeysClient(); const { apiKey } = await keys.create({ forUserSub: session.user.zewstIdSub, name, scopes, expiresInDays: 90, }); // apiKey.key is shown ONCE — return to client, then drop. return Response.json({ apiKey }); }
Drop-in client-side UI:
'use client'; import { ZewstIDApiKeysManager } from '@zewstid/id-nextjs'; export default function ApiKeysSettings() { return ( <ZewstIDApiKeysManager endpoints={{ list: '/api/me/api-keys', create: '/api/me/api-keys', revoke: (id) => `/api/me/api-keys/${id}` }} availableScopes={[ { value: 'cal:read', label: 'Read calendar events' }, { value: 'cal:write', label: 'Manage calendar events' }, ]} /> ); }
Full guide: User-scoped API keys.
2. Standards-based OIDC discovery
Standard OIDC client libraries (NextAuth's
KeycloakProviderhttps://api.zewstid.com/.well-known/openid-configuration
No more hardcoding endpoint paths or hunting through Keycloak realm URLs. The auto-discovery doc advertises the clean
/oauth/{authorize,token,introspect,revoke,userinfo,logout}https://api.zewstid.com/.well-known/jwks.jsonIf you currently hardcode endpoints in your app, you can replace them with discovery — see the OIDC Discovery guide.
Troubleshooting
npm install returns 404 Not Found
npm install404 Not FoundYou're not authenticated to the
@zewstidnpm whoami --registry=https://registry.npmjs.org/npm login --scope=@zewstid403 Forbidden instead of 404
403 ForbiddenYou're authenticated but your account isn't a member of the
@zewstidCI build fails with auth error
Make sure your CI's
.npmrc${NPM_TOKEN}@zewstidOld @zewstid/nextjs still resolves on npm install
@zewstid/nextjsnpm installIf you didn't delete
package-lock.jsonrm -rf node_modules package-lock.json npm install
Mixing old and new in the same project
Don't. The old packages on Verdaccio (
npm.zewstid.com@zewstid/*@zewstid/id-*See also
- SDK Changelog — full feature history per release
- User-Scoped API Keys — issue API keys to your end users via ZewstID
- OIDC Discovery & Endpoints — auto-discovery, JWKS, clean OAuth paths
Was this page helpful?
Let us know how we can improve our documentation