NextJS SDK results in page not found

Please include the following information in your post:

  • Which SDK this is regarding: NextJS SDK
  • SDK Version: 1.3.1
  • Platform Version: Node v15.10.0
  • Code Snippets/Error Messages/Supporting Details/Screenshots:

    I have used the example code from the NextJS quick start guide. Another probably important detail would be that I also use Go serverless functions in this project, but since I use Vercel to host it I have them in a different API directory (Vercel says that NodeJS serverless functions should still be in the pages/api directory).
    I hope that someone can help me with this issue. Thank you in advance!

Is this a feature request or bug report? It probably isnt a bug and just me doing something wrong.

I forgot to add this: I have also tried it with putting the auth folder in the root api directory, which resulted in the same error but didn`t show the 404 error.

Update: It works if i remove my normal API folder (only has an URL route and nothing with auth)

1 Like

Thanks for sharing it with the rest of community!

Is there a way to use the NextJS auth0 SDK together with other serverless functions in other languages?

Not sure about it, you will potentially need to ask repo maintainers via GitHub issue about that

1 Like

@Pum Vercel is working fine for me, but my project is on Node 14. I see you are on 15, could be something to do with that? Try bumping it down in the Vercel settings and see if that does the trick for you.

Are you also using serverless functions in multiple languages (and therefore also two API folders?
If yes I will try that thanks!

Nope, just a standard nextjs setup here.