-
Notifications
You must be signed in to change notification settings - Fork 37
/
index.html
46 lines (44 loc) · 1.22 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>entropychat.app</title>
<meta name="description" content="entropychat.app">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif';
font-weight: 400;
font-size: 16px;
background: #290016;
color: #dc136c;
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
h1 { margin: 1em 0 0 0; font-weight: 300; }
</style>
</head>
<body>
<img src="https://i.imgur.com/KQDKLRa.png">
<h1 id="info">Logging you in...</h1>
<script>
const params = new URLSearchParams(window.location.hash.slice(1));
const token = params.get('access_token');
if (window.opener && token) {
// TODO: dynamically set origin
window.opener.postMessage({ token }, 'http://localhost:8080');
} else {
info.textContent = 'Go home.';
}
window.close();
</script>
</body>
</html>