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/protected/profile/route.ts
2024-07-08 11:49:46 +02:00

13 lines
262 B
TypeScript

import { NextResponse } from 'next/server';
import { getSession } from '@auth0/nextjs-auth0';
export async function GET() {
const session = await getSession();
return NextResponse.json({
success: true,
data: { email: session?.user.email }
});
}