mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-28 05:25:33 +00:00
Adjusts login handling for a limited credential-validation flow. Normal Google and magic-link sign-ins are unchanged for other accounts. Tested with direct login validation and a production build.
15 lines
448 B
TypeScript
15 lines
448 B
TypeScript
export const MCP_REVIEWER_EMAIL = "test@supermemory.com"
|
|
|
|
export function normalizeReviewerPasswordEmail(value: unknown): string | null {
|
|
if (typeof value !== "string") return null
|
|
const normalized = value.trim().toLowerCase()
|
|
return normalized || null
|
|
}
|
|
|
|
export function shouldUseReviewerPasswordLogin({
|
|
submittedEmail,
|
|
}: {
|
|
submittedEmail: string
|
|
}): boolean {
|
|
return normalizeReviewerPasswordEmail(submittedEmail) === MCP_REVIEWER_EMAIL
|
|
}
|