request can be the following:
NextRequest when the handler is used in the App Router of Next.jsNextApiRequest when the handler is used in the Pages Router of Next.jscontextOrRequest can be the following:
NextApiResponse when the handler is used in the Pages Router of Next.jsa Promise of Response when used in the App Router of Next.js, or
returns undefined when used in the Pages Router of Next.js.
The handler function for handling the GET requests sent to the Auth API routes. Only
GETmethod gets handled, otherwise it rejects.