feat: complete MVP foundation auth and dashboard
This commit is contained in:
11
lib/proxy-auth.ts
Normal file
11
lib/proxy-auth.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { MOCK_SESSION_COOKIE_VALUE } from "./mock-auth";
|
||||
|
||||
export function shouldRedirectDashboardRequest(
|
||||
pathname: string,
|
||||
sessionCookieValue: string | undefined,
|
||||
) {
|
||||
return (
|
||||
pathname.startsWith("/dashboard") &&
|
||||
sessionCookieValue !== MOCK_SESSION_COOKIE_VALUE
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user