feat: update local authentication mode to require a non-placeholder token of at least 50 characters
This commit is contained in:
@@ -2,9 +2,10 @@ import { NextResponse } from "next/server";
|
||||
import { clerkMiddleware, createRouteMatcher } from "@clerk/nextjs/server";
|
||||
|
||||
import { isLikelyValidClerkPublishableKey } from "@/auth/clerkKey";
|
||||
import { AuthMode } from "@/auth/mode";
|
||||
|
||||
const isClerkEnabled = () =>
|
||||
process.env.NEXT_PUBLIC_AUTH_MODE !== "local" &&
|
||||
process.env.NEXT_PUBLIC_AUTH_MODE !== AuthMode.Local &&
|
||||
isLikelyValidClerkPublishableKey(
|
||||
process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user