// src/auth/login-page.ts export interface LoginPageParams { redirectUri: string; state?: string; codeChallenge: string; clientId: string; scopes: string[]; resource?: string; error?: string; } export function renderLoginPage(params: LoginPageParams): string { const error = params.error ? `
${escapeHtml(params.error)}
` : ""; return ` TradeBlocks - Sign In

TradeBlocks

Sign in to access your trading data

${error}
${params.resource ? `` : ""}
`; } function escapeHtml(str: string): string { return str .replace(/&/g, "&") .replace(/"/g, """) .replace(//g, ">"); }