From fd25a6af57267df4c14bcd7dc655d3756b786093 Mon Sep 17 00:00:00 2001 From: Boris <89133408+boris-szl@users.noreply.github.com> Date: Mon, 3 Jun 2024 01:38:42 +0200 Subject: [PATCH] refactor: rename API endpoint to '/api/protected-api' for comment (#66456) Requests to the protected endpoint without the '-api' suffix will return a 404. Ensure to use '/api/protected-api' to see the expected behavior. Co-authored-by: Sam Ko --- examples/auth0/pages/api/protected-api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/auth0/pages/api/protected-api.ts b/examples/auth0/pages/api/protected-api.ts index b33602c3e4..962a95fbee 100644 --- a/examples/auth0/pages/api/protected-api.ts +++ b/examples/auth0/pages/api/protected-api.ts @@ -1,7 +1,7 @@ import { withApiAuthRequired, getSession } from "@auth0/nextjs-auth0"; // Serverless function -// Protected API, requests to '/api/protected' without a valid session cookie will fail +// Protected API, requests to '/api/protected-api' without a valid session cookie will fail async function handle(req, res) { const { user } = await getSession(req, res);