Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ynoth25's avatar

Laravel api sanctum and nextjs

Greetings!

I have this nextjs app and I am creating a login feature with laravel as my api. I already installed laravel jetstream and sanctum using composer but this error still persists: api/sanctum/csrf-cookie 404 not found.

Thanks for the help

0 likes
1 reply
3arafa109's avatar

api/sanctum/csrf-cookie is not correct url, the correct url is just sanctum/csrf-cookie

Please or to participate in this conversation.