* Fix Next.js getServerSession API Routes example
Example API code threw an error in Next.js. Fixed the example to work.
* Update docs/docs/configuration/nextjs.md
---------
Co-authored-by: Balázs Orbán <info@balazsorban.com>
I spent at least a day figuring out why my tRPC caches were all [MISSing](https://vercel.com/docs/concepts/edge-network/caching#miss) even though I set the correct Cache-Control headers (my stack: NextAuth, NextJS, tRPC, Vercel). I wish information could be placed where appropriate so that others don't need to debug like I had too.
I realise it's a bit convoluted as tRPC suggested I could fetch the session in the context and then use it throughout my routers. It was not obvious to me that this caused all the public caches to fail, even on query procedures that were not using the session. The caches were MISSing because `getServerSession` refreshes the cookies via the `set-cookie` header and [Vercel won't allow this](https://vercel.com/docs/concepts/functions/serverless-functions/edge-caching). I'm not saying the refreshing of cookies is wrong, it's a nice feature, and it's kind of handy this implicitly means Vercel doesn't cache.
So how I got here has many causes and it's futile to find anyone to "blame". The factors are:
- tRPC suggests `getSession()` in their [documentation for context](https://trpc.io/docs/server/context).
- I see tRPC does not suggest `getSession()` in the page for [caching](https://trpc.io/docs/server/caching) which is correct but wasn't obvious to me what I had done wrong.
- my misunderstanding about the link between session and personalized data (it makes sense to me now but it wasn't that obvious to see the link: get session means no public cache)
Updated the Getting Started documentation file (section about adding NextAuth API routes) to refer to another documentation section where the NextAuth API routes are handled using the new App Router and Route Handlers
* feat: support Route Handlers
* update dev app
* init NextAuth via Route Handler in dev app
* import as type
* fix labeler
* default secret to `NEXTAUTH_SECRET`
* handle redirects
* support advanced init in Route Handlers
* use port 3000 for docs dev
* document initialization with Route Handlers
* upgrade to latest `next`
* upgrade to 13.3.0
* remove workaround
* cleanup