Changes made (based on next and nextauth docs, see commit for details):
- NEXTAUTH_URL is http://localhost:3000/custom-route/api/auth
- SessionProvider has basePath set
- next.config.js has basePath
Environment is already included.
npm run dev
Visit http://localhost:3000/custom-route.
Pages will render as before.
BUT... can't Sign In (will get HTTP error)
npm i next-auth@v4.18.1
npm run dev