Next.js Auth0 | External API service (without /api directory)

Hi everyone

We have an existing API service that we started building a few weeks ago. We’re about to kick off the frontend development using Next.js soon.

We looked at the example projects and docs of the Next.js Auth0 lib, it seems all the examples require an API service (/api/auth/[...auth0].js) to handle auth on the backend of the Next.js project.

Is there any way to use Next.js with Auth0, but only the frontend side of it (similar to a plain React app)? We don’t want to use the API service feature of the Next.js (just because our API service is already built, and lives on a production infrastructure).

Note: We tried to mimic the React project, but it seems we try to hack it, and thus, we couldn’t get it right.

Information

  • SDK: nextjs-auth0
  • SDK Version: 1.9.1
  • Platform Version: 12.1.6
1 Like

We are having the same issue. Any insight here would be greatly appreciated.

1 Like