diff --git a/web/src/middleware.ts b/web/src/middleware.ts index 6e933bb..36b70dc 100644 --- a/web/src/middleware.ts +++ b/web/src/middleware.ts @@ -10,9 +10,9 @@ export function middleware(request: NextRequest) { } // Protected routes: check for Logto session cookie - // The Logto SDK stores session data in a cookie named `logto:` + // The Logto SDK stores session data in a cookie named `logto_` const hasSession = request.cookies.getAll().some( - (cookie) => cookie.name.startsWith('logto:') + (cookie) => cookie.name.startsWith('logto_') ); if (!hasSession && !pathname.startsWith('/auth')) {