We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 44b1c0f + a7867a7 commit aa61fd6Copy full SHA for aa61fd6
EXAMPLES.md
@@ -251,7 +251,7 @@ Requests to `/api/protected` without a valid session cookie will fail with `401`
251
// app/api/protected/route.js
252
import { withApiAuthRequired, getSession } from '@auth0/nextjs-auth0';
253
254
-export default withApiAuthRequired(async function myApiRoute(req) {
+export const GET = withApiAuthRequired(async function myApiRoute(req) {
255
const res = new NextResponse();
256
const { user } = await getSession(req, res);
257
return NextResponse.json({ protected: 'My Secret', id: user.sub }, res);
0 commit comments