Closed emil14 closed 9 months ago
I use Auth0 in NextJS, so i can do this at Edge environment:
import { getSession } from "@auth0/nextjs-auth0/edge";
export const runtime = "edge";
// api/generate code here
export async function POST(req: Request): Promise<Response> {
const { user } = await getSession();
...
}
This is not really related to Novel, I've also disabled the AI feature for now. After I finish my work it would be opt-in and fully customizable.
Here we can see than Novel calls
fetch
without ability to insert custom headers. Same goes for 'api/generate' logic. How one must implement auth?