* Fix verification-token link
* Fix upgrade guide verification token
* Fix introduction adapter link
* Fix GitHub adapter link
* Fix 'Create an adapter' adapter link
* Fixed Twitter adapter link
* Fix 'Azure AD provider' adapter link
The line being changed is the first instance of basePath in this document, and it is highlighting an errant way to define a custom basePath as it is missing the necessary full route to NextAuth which is explained further down. This is misleading if the user reads the comment about custom base paths and stops reading there.
* 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)