-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcallback.html
More file actions
61 lines (56 loc) · 1.88 KB
/
Copy pathcallback.html
File metadata and controls
61 lines (56 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TikTok OAuth Callback - JarretPosts</title>
<meta name="description" content="TikTok OAuth callback page for JarretPosts.">
<link rel="icon" href="assets/app-icon.png">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header class="site-header">
<a class="brand" href="index.html" aria-label="JarretPosts home">
<img src="assets/app-icon.png" alt="" width="36" height="36">
<span>JarretPosts</span>
</a>
<nav aria-label="Main navigation">
<a href="privacy.html">Privacy</a>
<a href="terms.html">Terms</a>
</nav>
</header>
<main class="legal">
<h1>TikTok Authorization</h1>
<p id="status">Reading authorization response...</p>
<section class="content-section">
<h2>Authorization Code</h2>
<p>
Copy this code back into JarretPosts to finish connecting TikTok.
</p>
<pre id="codeBox" class="code-box">No code found.</pre>
</section>
</main>
<footer>
<span>© 2026 JarretPosts</span>
<a href="privacy.html">Privacy Policy</a>
<a href="terms.html">Terms of Service</a>
</footer>
<script>
const params = new URLSearchParams(window.location.search);
const code = params.get("code");
const error = params.get("error");
const errorDescription = params.get("error_description");
const status = document.getElementById("status");
const codeBox = document.getElementById("codeBox");
if (code) {
status.textContent = "Authorization succeeded.";
codeBox.textContent = code;
} else if (error) {
status.textContent = "Authorization failed.";
codeBox.textContent = errorDescription || error;
} else {
status.textContent = "No authorization code was returned.";
}
</script>
</body>
</html>