clerk / clerk-docs

The documentation content for Clerk, an authentication and user management platform.
https://clerk.com/docs
80 stars 287 forks source link

Fix missing imports from Node SDK usage #1166

Closed wobsoriano closed 3 weeks ago

wobsoriano commented 3 weeks ago

In the Node SDK example on the Clerk docs site, there are sections where resources are destructured from the clerkClient function and imported directly. These methods are not exported, resulting in an error.

This change updates those sections to just import clerkClient and access the resource from it.

Before:

import { sessions } from '@clerk/clerk-sdk-node';

// more code

const session = await sessions.verifySession(sessionId, clientToken);

After:

import { clerkClient } from '@clerk/clerk-sdk-node';

// more code

const session = await clerkClient.sessions.verifySession(sessionId, clientToken);