supermemory/apps/web/lib/reviewer-password-login.ts
Prasanna721 68769200b0 validate MCP OAuth login flow (#1395)
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.
2026-08-01 05:15:22 +00:00

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
}