Docs outdated with only /pages file structure
Answered
Greenish Elaenia posted this in #help-forum
Greenish ElaeniaOP
https://nextjs.org/docs/pages/building-your-application/authentication#implementing-authentication
If a project has a /app file structure and tries to do
/api/auth/login.ts, 404 NOT FOUND will be returned when calling
await fetch('/api/auth/login');
The docs should point out that this example is for /pages setup, and also provide a second example for /app
If a project has a /app file structure and tries to do
/api/auth/login.ts, 404 NOT FOUND will be returned when calling
await fetch('/api/auth/login');
The docs should point out that this example is for /pages setup, and also provide a second example for /app
Answered by joulev
https://nextjs.org/docs/app/building-your-application/authentication this is the corresponding page for the app router
3 Replies
https://nextjs.org/docs/app/building-your-application/authentication this is the corresponding page for the app router
Answer
Greenish ElaeniaOP
Oh didnt even notice