From 7127644c9ee8cc5305520195492156a98bfe3d62 Mon Sep 17 00:00:00 2001 From: Ahmad <103906421+ahmadk953@users.noreply.github.com> Date: Sun, 14 Apr 2024 17:17:01 -0400 Subject: [PATCH] Removed Old Middleware --- middleware.ts | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/middleware.ts b/middleware.ts index 05eb96d..66ffecf 100644 --- a/middleware.ts +++ b/middleware.ts @@ -8,28 +8,3 @@ export default clerkMiddleware(); export const config = { matcher: ['/((?!.*\\..*|_next).*)', '/', '/(api|trpc)(.*)'], }; - -/** - * Old Middleware - */ - -/* import { authMiddleware, redirectToSignIn } from '@clerk/nextjs'; -import { NextResponse } from 'next/server'; - -export default authMiddleware({ - publicRoutes: ['/', '/api/webhook', '/privacy-policy', '/terms-of-service'], - afterAuth(auth, req) { - if (!auth.userId && !auth.isPublicRoute) { - return redirectToSignIn({ returnBackUrl: req.url }); - } - - if (auth.userId && !auth.orgId && req.nextUrl.pathname !== '/select-org') { - const orgSelection = new URL('/select-org', req.url); - return NextResponse.redirect(orgSelection); - } - }, -}); - -export const config = { - matcher: ['/((?!.+\\.[\\w]+$|_next).*)', '/', '/(api|trpc)(.*)'], -}; */