(code: string, description: string)
| 197 | } |
| 198 | |
| 199 | function errorPage(code: string, description: string): string { |
| 200 | const safeCode = escapeHtml(code); |
| 201 | const safeDesc = escapeHtml(description); |
| 202 | return `<!doctype html><html><head><meta charset="utf-8"><title>Sign-in failed</title> |
| 203 | <style>body{font-family:system-ui,sans-serif;display:flex;align-items:center;justify-content:center;height:100vh;margin:0;background:#1a0b0b;color:#e6e8eb}main{max-width:480px;text-align:center;padding:32px;border-radius:12px;background:#1d1111;border:1px solid #301f1f}h1{font-weight:600;margin:0 0 8px;color:#ff7a7a}code{background:#2a1414;padding:2px 6px;border-radius:4px}p{margin:8px 0 0;color:#9aa3ad}</style> |
| 204 | </head><body><main><h1>Sign-in failed</h1><p><code>${safeCode}</code></p><p>${safeDesc}</p></main></body></html>`; |
| 205 | } |
| 206 | |
| 207 | function escapeHtml(s: string): string { |
| 208 | return s |
no test coverage detected