forked from trezor/connect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.html
51 lines (39 loc) · 1.27 KB
/
login.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
47
48
49
50
51
<!DOCTYPE html>
<html>
<head>
<title>TREZOR Login Test</title>
<script type="text/javascript">
function trezorLogin(response) {
document.getElementById("response").innerHTML = JSON.stringify(response, undefined, 2);
console.log(response);
}
</script>
</head>
<body>
<trezor:login callback="trezorLogin"></trezor:login>
<pre id="response"></pre>
<!--
// You can use custom icon (i.e. not TREZOR logo) by setting the
// icon attribute of the trezor:login tag.
<trezor:login icon="https://example.com/icon.png">
</trezor:login>
// You can use custom hidden/visual challenges (i.e. not generated
// by Connect) by setting the challenge_hidden/challenge_visual
// attributes of the trezor:login tag.
// This can be done either on the server side while rendering
// the page contents like this:
<trezor:login callback="trezorLogin"
challenge_hidden="0123456789abcdef"
challenge_visual="Lorem Ipsum">
</trezor:login>
// ... or using the following script on the client side:
<script>
var elements = document.getElementsByTagName('trezor:login');
var e = elements[0];
e.setAttribute('challenge_hidden', '0123456789abcdef');
e.setAttribute('challenge_visual', 'Lorem Ipsum');
</script>
-->
<script src="../connect.js" type="text/javascript"></script>
</body>
</html>