| 24 | </html>` |
| 25 | |
| 26 | const HTML_ERROR = (error: string) => `<!DOCTYPE html> |
| 27 | <html> |
| 28 | <head> |
| 29 | <title>Arctic - Authorization Failed</title> |
| 30 | <style> |
| 31 | body { font-family: system-ui, -apple-system, sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background: #1a1a2e; color: #eee; } |
| 32 | .container { text-align: center; padding: 2rem; } |
| 33 | h1 { color: #f87171; margin-bottom: 1rem; } |
| 34 | p { color: #aaa; } |
| 35 | .error { color: #fca5a5; font-family: monospace; margin-top: 1rem; padding: 1rem; background: rgba(248,113,113,0.1); border-radius: 0.5rem; } |
| 36 | </style> |
| 37 | </head> |
| 38 | <body> |
| 39 | <div class="container"> |
| 40 | <h1>Authorization Failed</h1> |
| 41 | <p>An error occurred during authorization.</p> |
| 42 | <div class="error">${error}</div> |
| 43 | </div> |
| 44 | </body> |
| 45 | </html>` |
| 46 | |
| 47 | interface PendingAuth { |
| 48 | resolve: (code: string) => void |