Files
archived-next-auth/apps/dev/pages/api/examples/session.js
Balázs Orbán a7c55b752f chore(dev): move dev app to apps workspace (#3888)
* chore: move dev app

* chore: run tests sequentially
2022-02-09 01:12:24 +01:00

8 lines
241 B
JavaScript

// This is an example of how to access a session from an API route
import { getSession } from "next-auth/react"
export default async (req, res) => {
const session = await getSession({ req })
res.send(JSON.stringify(session, null, 2))
}