HappyFeet
HappyFeet
CCConvex Community
Created by HappyFeet on 9/10/2024 in #support-community
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
1 replies