Skip to content

Commit 0bc4774

Browse files
authored
Fix: Update getAccessToken import and usage in examples (#2165)
1 parent be9b2e4 commit 0bc4774

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

EXAMPLES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,12 +533,12 @@ When calling `getAccessToken` without request and response objects, you can pass
533533

534534
```typescript
535535
// app/api/my-api/route.ts
536-
import { getAccessToken } from '@auth0/nextjs-auth0';
536+
import { auth0 } from "@/lib/auth0"
537537

538538
export async function GET() {
539539
try {
540540
// Force a refresh of the access token
541-
const { token, expiresAt } = await getAccessToken({ refresh: true });
541+
const { token, expiresAt } = await auth0.getAccessToken({ refresh: true });
542542

543543
// Use the refreshed token
544544
// ...

0 commit comments

Comments
 (0)