Skip to content

Commit 9527ac0

Browse files
author
MrSpamer Bot
committed
feat: add LinkedIn OAuth callback page
1 parent d4cfcbe commit 9527ac0

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

oauth/callback/index.html

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>WebScience - OAuth Callback</title>
7+
<style>
8+
body { font-family: -apple-system, sans-serif; max-width: 600px; margin: 80px auto; padding: 20px; text-align: center; }
9+
.code-box { background: #f0f0f0; border: 2px solid #333; border-radius: 8px; padding: 20px; margin: 20px 0; font-family: monospace; font-size: 18px; word-break: break-all; user-select: all; }
10+
.success { color: #2e7d32; }
11+
.error { color: #c62828; }
12+
button { background: #1976d2; color: white; border: none; padding: 10px 24px; border-radius: 4px; cursor: pointer; font-size: 16px; }
13+
button:hover { background: #1565c0; }
14+
.copied { color: #2e7d32; margin-top: 10px; }
15+
</style>
16+
</head>
17+
<body>
18+
<h1>WebScience OAuth</h1>
19+
<div id="result"></div>
20+
<script>
21+
const params = new URLSearchParams(window.location.search);
22+
const code = params.get('code');
23+
const error = params.get('error');
24+
const resultDiv = document.getElementById('result');
25+
26+
if (code) {
27+
resultDiv.innerHTML = `
28+
<p class="success">Authorization successful!</p>
29+
<p>Copy this code and send it to MrSpamer on Discord:</p>
30+
<div class="code-box" id="code">${code}</div>
31+
<button onclick="copyCode()">Copy Code</button>
32+
<div id="copied"></div>
33+
`;
34+
} else if (error) {
35+
resultDiv.innerHTML = `<p class="error">Error: ${error}</p><p>${params.get('error_description') || ''}</p>`;
36+
} else {
37+
resultDiv.innerHTML = `<p class="error">No authorization code received.</p>`;
38+
}
39+
40+
function copyCode() {
41+
navigator.clipboard.writeText(document.getElementById('code').textContent);
42+
document.getElementById('copied').innerHTML = '<p class="copied">Copied!</p>';
43+
}
44+
</script>
45+
</body>
46+
</html>

0 commit comments

Comments
 (0)