Incorrect docs for NextJS "Server-side authentication"

The implementation of getAuthToken depends on your authentication provider.

app/auth.ts
import { auth } from "@clerk/nextjs";

export async function getAuthToken() {
  return (await auth().getToken({ template: "convex" })) ?? undefined;
}


should be

import { auth } from "@clerk/nextjs/server";


took a second to figure out
Was this page helpful?