This repository has been archived on 2026-01-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
nextjs-auth0/app/api/profile/route.ts

12 lines
266 B
TypeScript

import { NextResponse } from 'next/server';
import { getSession, withApiAuthRequired } from '@auth0/nextjs-auth0';
const GET = withApiAuthRequired(async () => {
const session = await getSession();
return NextResponse.json(session?.user);
});
export { GET };