HappyFeet
HappyFeet5mo ago

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;
}
import { auth } from "@clerk/nextjs";

export async function getAuthToken() {
return (await auth().getToken({ template: "convex" })) ?? undefined;
}
should be
import { auth } from "@clerk/nextjs/server";
import { auth } from "@clerk/nextjs/server";
took a second to figure out
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?