You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { clerkMiddleware, createRouteMatcher } from "@clerk/nextjs/server";
const protectedRoutes = createRouteMatcher([
'/',
'/upcoming',
'/previous',
'/recordings',
'/personal-room',
'/meeting(.*)'
]);
export default clerkMiddleware((auth, req) => {
if(protectedRoutes(req)) {auth().protect()} //checks if the current request is going to the protected route, if yes, it will redirect to the login page