feat: update local authentication mode to require a non-placeholder token of at least 50 characters

This commit is contained in:
Abhimanyu Saharan
2026-02-11 19:30:25 +05:30
parent b87f56de7a
commit 571b4844d9
18 changed files with 363 additions and 54 deletions

View File

@@ -1,10 +1,12 @@
"use client";
import { AuthMode } from "@/auth/mode";
let localToken: string | null = null;
const STORAGE_KEY = "mc_local_auth_token";
export function isLocalAuthMode(): boolean {
return process.env.NEXT_PUBLIC_AUTH_MODE === "local";
return process.env.NEXT_PUBLIC_AUTH_MODE === AuthMode.Local;
}
export function setLocalAuthToken(token: string): void {

View File

@@ -0,0 +1,4 @@
export enum AuthMode {
Clerk = "clerk",
Local = "local",
}