Skip to content

Commit b55912c

Browse files
committed
add a section about exposing the WorkOS SDK to the README
1 parent 83b4fb8 commit b55912c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,22 @@ export default authkitMiddleware({
401401
});
402402
```
403403
404+
### Advanced: Direct access to the WorkOS client
405+
406+
For advanced use cases or functionality not covered by the helper methods, you can access the underlying WorkOS client directly:
407+
408+
```typescript
409+
import { getWorkOS } from '@workos-inc/authkit-nextjs';
410+
411+
// Get the configured WorkOS client instance
412+
const workos = getWorkOS();
413+
414+
// Use any WorkOS SDK method
415+
const organizations = await workos.organizations.listOrganizations({
416+
limit: 10,
417+
});
418+
````
419+
404420
### Debugging
405421
406422
To enable debug logs, initialize the middleware with the debug flag enabled.

0 commit comments

Comments
 (0)