-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
39 lines (34 loc) · 1.1 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
<html>
<head>
<title>Cognito Authentication Test</title>
<script type="application/javascript" src="webapp.js"></script>
</head>
<body>
<h3>COGNITO AUTHORIZATION FLOW WITH PKCE TESTING</h3>
<div id="testNavigation" hidden>
<hr />
<p>
<ul>
<li><a href="pure-js.html">Test using plain old JavaScript</a></li>
</ul>
</p>
</div>
<div id="logoutNavigation" hidden>
<hr />
<p>
<button onclick="goLogout()">Logout</button> <div id="userEmailDiv" style="display: inline;"></div>
</p>
</div>
</body>
<script type="application/javascript">
if (isLoggedIn()) {
var userEmail = sessionStorage.getItem("userEmail");
document.getElementById("logoutNavigation").hidden = false;
document.getElementById("testNavigation").hidden = true;
document.getElementById("userEmailDiv").innerText = " " + userEmail;
} else {
document.getElementById("logoutNavigation").hidden = true;
document.getElementById("testNavigation").hidden = false;
}
</script>
</html>