forked from achimschloss/fedcm-rp-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.html
85 lines (73 loc) · 2.95 KB
/
home.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!--
Copyright 2023 European netID Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Portions of this code are derived from the FedCM Demo
https://fedcm-rp-demo.glitch.me/, licensed under the Apache License,
Version 2.0 by 2019 Google Inc. Copyright 2019
-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>FedCM RP Demo</title>
<meta name="description" content="FedCM RP Demo" />
<link id="favicon" rel="icon"
href="https://cdn.glitch.me/94838ffe-241b-4a67-a9e0-290bfe34c351%2Fbank.png?v=1639111444422" type="image/x-icon" />
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/styles-bundle.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="stylesheet" href="https://unpkg.com/material-components-web@7.0.0/dist/material-components-web.min.css" />
<script src="components-bundle.js" type="module"></script>
<meta name="nonce" content="{{nonce}}" />
<meta http-equiv="origin-trial" content="{{ot_token}}" />
</head>
<body class="mdc-typography">
<body class="mdc-typography">
<script type="module">
import {
$,
signout
} from "./client.js";
$("#code").addEventListener("click", (e) => {
location.href =
"https://glitch.com/edit/#!/furtive-candy-cauliflower";
});
$("#sign-out-btn").addEventListener("click", signout("{{user_id}}"));
</script>
</body>
<mwc-top-app-bar-fixed>
<span slot="title">FedCM RP Demo</span>
<mwc-icon-button id="code" icon="code" slot="actionItems"></mwc-icon-button>
</mwc-top-app-bar-fixed>
<mwc-linear-progress id="progress"></mwc-linear-progress>
<main class="content">
<h2 class="center">Congrats!</h2>
<div id="main-sections">
{{#if user_id}}
<div id="profile" class="card center">
<p id="signed-in-msg">You are signed in!</p>
<img id="user-picture" class="picture" width="40" src="{{picture}}" />
<p id="user-info">{{name}} ({{username}})</p>
</div>
{{/if}}
{{#if access_token}}
<div id="access" class="card center">
<p>Access granted</p>
<p id="token-scope">Scope: {{access_token.scope}}</p>
</div>
{{/if}}
<mwc-button class="center" id="sign-out-btn" raised> Sign-out </mwc-button>
</div>
</main>
<mwc-snackbar id="snackbar"></mwc-snackbar>
</body>
</html>