Created
April 12, 2026 12:14
-
-
Save johnaqu1no/d8318d58d322db35cbfaf8e7d45775f3 to your computer and use it in GitHub Desktop.
Vale OAuth consent page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Authorize — Vale</title> | |
| <style> | |
| *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } | |
| body { | |
| font-family: -apple-system, BlinkMacSystemFont, 'SF Pro', 'Segoe UI', system-ui, sans-serif; | |
| background: #0a0a0b; | |
| color: #e4e4e7; | |
| min-height: 100vh; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 1rem; | |
| } | |
| .card { | |
| background: #18181b; | |
| border: 1px solid #27272a; | |
| border-radius: 16px; | |
| padding: 2.5rem 2rem; | |
| max-width: 400px; | |
| width: 100%; | |
| } | |
| .logo { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 0.25rem; letter-spacing: -0.02em; } | |
| .subtitle { text-align: center; color: #71717a; font-size: 0.875rem; margin-bottom: 2rem; } | |
| .scope-badge { display: inline-block; background: #27272a; color: #a1a1aa; font-size: 0.75rem; padding: 0.25rem 0.75rem; border-radius: 9999px; } | |
| .scope-row { text-align: center; margin-bottom: 1.5rem; } | |
| label { display: block; font-size: 0.8125rem; font-weight: 500; color: #a1a1aa; margin-bottom: 0.375rem; } | |
| input[type="email"], input[type="password"] { | |
| width: 100%; padding: 0.625rem 0.75rem; background: #0a0a0b; border: 1px solid #27272a; | |
| border-radius: 8px; color: #e4e4e7; font-size: 0.9375rem; outline: none; transition: border-color 0.15s; | |
| } | |
| input:focus { border-color: #3b82f6; } | |
| .field { margin-bottom: 1rem; } | |
| .btn { | |
| width: 100%; padding: 0.625rem; background: #3b82f6; color: #fff; font-size: 0.9375rem; | |
| font-weight: 600; border: none; border-radius: 8px; cursor: pointer; transition: background 0.15s; margin-top: 0.5rem; | |
| } | |
| .btn:hover { background: #2563eb; } | |
| .btn:active { background: #1d4ed8; } | |
| .btn:disabled { background: #1e3a5f; cursor: not-allowed; } | |
| .error { background: #451a1a; border: 1px solid #7f1d1d; color: #fca5a5; font-size: 0.8125rem; padding: 0.5rem 0.75rem; border-radius: 8px; margin-bottom: 1rem; } | |
| .footer { text-align: center; color: #52525b; font-size: 0.75rem; margin-top: 1.5rem; } | |
| .hidden { display: none; } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="card"> | |
| <div class="logo">Vale</div> | |
| <div class="subtitle">Sign in to authorize access</div> | |
| <div class="scope-row"><span class="scope-badge" id="scope">mcp:tools</span></div> | |
| <div class="error hidden" id="error"></div> | |
| <!-- Native form POST — browser follows the 302 redirect without CORS issues --> | |
| <form id="form" method="POST" action="https://nqqakprivxiclwvuzxih.supabase.co/functions/v1/oauth?action=authorize"> | |
| <input type="hidden" name="client_id" id="h_client_id"> | |
| <input type="hidden" name="redirect_uri" id="h_redirect_uri"> | |
| <input type="hidden" name="state" id="h_state"> | |
| <input type="hidden" name="scope" id="h_scope"> | |
| <input type="hidden" name="code_challenge" id="h_code_challenge"> | |
| <input type="hidden" name="code_challenge_method" id="h_code_challenge_method"> | |
| <div class="field"><label for="email">Email</label><input type="email" id="email" name="email" required autocomplete="email" autofocus></div> | |
| <div class="field"><label for="password">Password</label><input type="password" id="password" name="password" required autocomplete="current-password"></div> | |
| <button type="submit" class="btn" id="btn">Authorize</button> | |
| </form> | |
| <div class="footer">By authorizing, you grant this application access to your Vale projects and tasks.</div> | |
| </div> | |
| <script> | |
| const params = new URLSearchParams(window.location.search); | |
| // Populate hidden fields from URL params | |
| document.getElementById('scope').textContent = params.get('scope') || 'mcp:tools'; | |
| document.getElementById('h_client_id').value = params.get('client_id') || ''; | |
| document.getElementById('h_redirect_uri').value = params.get('redirect_uri') || ''; | |
| document.getElementById('h_state').value = params.get('state') || ''; | |
| document.getElementById('h_scope').value = params.get('scope') || 'mcp:tools'; | |
| document.getElementById('h_code_challenge').value = params.get('code_challenge') || ''; | |
| document.getElementById('h_code_challenge_method').value = params.get('code_challenge_method') || 'S256'; | |
| // Show error from URL param (redirect back on auth failure) | |
| const err = params.get('error'); | |
| if (err) { | |
| const el = document.getElementById('error'); | |
| el.textContent = err; | |
| el.classList.remove('hidden'); | |
| } | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment