MCPcopy
hub / github.com/nextauthjs/next-auth / handler

Function handler

apps/example-nextjs/pages/api/examples/session.ts:7–13  ·  view source on GitHub ↗
(
  req: NextApiRequest,
  res: NextApiResponse
)

Source from the content-addressed store, hash-verified

5import type { NextApiRequest, NextApiResponse } from "next"
6
7export default async function handler(
8 req: NextApiRequest,
9 res: NextApiResponse
10) {
11 const session = await getServerSession(req, res, authOptions)
12 res.send(JSON.stringify(session, null, 2))
13}

Callers

nothing calls this directly

Calls 1

getServerSessionFunction · 0.90

Tested by

no test coverage detected