-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcallback.html
More file actions
60 lines (59 loc) · 1.85 KB
/
Copy pathcallback.html
File metadata and controls
60 lines (59 loc) · 1.85 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bazaar</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: #f6f5f4;
color: #2e3436;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
@media (prefers-color-scheme: dark) {
body { background: #1d1d20; color: #fff; }
.subtitle { color: #9a9996; }
}
.container { text-align: center; }
img {
width: 150px;
height: 150px;
margin-bottom: 1.5rem;
}
h1 {
font-size: 24px;
font-weight: 600;
margin-bottom: 0.5rem;
}
.subtitle {
font-size: 17px;
color: #77767b;
}
</style>
</head>
<body>
<div class="container">
<img src="assets/logo.svg" alt="Bazaar App Icon">
<h1 id="title">Flathub Login Successful</h1>
<p class="subtitle" id="message">You can close this window now</p>
</div>
<script>
const params = new URLSearchParams(window.location.search);
const code = params.get('code');
const error = params.get('error');
const state = params.get('state');
if (error) {
document.getElementById('title').textContent = 'Login failed';
document.getElementById('message').textContent = error;
} else if (code) {
const redirect = new URLSearchParams({ code, state });
window.location.href = `bazaar://oidc/callback?${redirect}`;
}
</script>
</body>
</html>