From 8f3e5f695d33e6fad13647b0cb228e883ff39e37 Mon Sep 17 00:00:00 2001 From: Nick Nisi Date: Thu, 25 Sep 2025 10:19:40 -0500 Subject: [PATCH] fix docs around eagerAuth usage - correct import - correct hook to be `useAccessToken` (not `useAuth`) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5ad92d5..d31ad91 100644 --- a/README.md +++ b/README.md @@ -244,7 +244,7 @@ export default async function HomePage() { For client components, use the `useAuth` hook to get the current user session. ```jsx -'use client' +'use client'; // Note the updated import path import { useAuth } from '@workos-inc/authkit-nextjs/components'; @@ -461,10 +461,10 @@ Then access the token synchronously in your client components: ```tsx 'use client'; -import { useAuth } from '@workos-inc/authkit-nextjs'; +import { useAccessToken } from '@workos-inc/authkit-nextjs/components'; function MyComponent() { - const { getAccessToken } = useAuth(); + const { getAccessToken } = useAccessToken(); // Token is available immediately on initial page load const token = getAccessToken();