13 lines
308 B
TypeScript
13 lines
308 B
TypeScript
import { NextResponse } from 'next/server';
|
|
|
|
import { getSession, withApiAuthRequired } from '@auth0/nextjs-auth0';
|
|
|
|
export const GET = withApiAuthRequired(async () => {
|
|
const session = await getSession();
|
|
|
|
return NextResponse.json({
|
|
success: true,
|
|
data: { email: session?.user.email }
|
|
});
|
|
});
|