Created
August 29, 2023 09:46
-
-
Save hujuu/226396e477bdfa7e963d9479db6a010a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { getSession, withApiAuthRequired } from '@auth0/nextjs-auth0'; | |
import { NextResponse } from 'next/server'; | |
const GET = withApiAuthRequired(async () => { | |
const session = await getSession(); | |
return NextResponse.json(session?.user); | |
}); | |
export { GET }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment